Snapshot listed multiple time when same repo is shared between two servers
I have one repository, based on rest-server, and two servers running backrest and using the same repository. One server show the same snapshot of other server multiple times.
View on server 50-backrest-srv
View on server 54-backrest-srv
Reindex has no effects. Backrest 1.7.2
I'm seeing a similar thing. I have a repo that gets backed up using resticker (think Restic command line executable automation). I then index those snapshots into backrest as a gui. Every time I index the repo, I'm getting another duplicate listing of the snapshot even though only 1 instance of the snapshot exists in the repo.
I thought I was going crazy. Glad it's not just me.
For some more info, it always appears to be the other devices snapshots that are duplicated.
So my instance, I have a hetzner storage box that stores my repo. With 2 local devices backing up. Device 1 shows snapshots correctly, but shows duplicates for device 2. The opposite is true when looking from the other device
Thanks for reporting this -- definitely a bug. I'll track down what's going on here and get out a patch for the next minor version release.
I believe the bug is in https://github.com/garethgeorge/backrest/blob/main/internal/orchestrator/tasks/taskindexsnapshots.go#L148 , I recently (accidentally) added logic that filters to snapshots from the current instance when considering what already exists / should be indexed. This is a relatively straightforward fix, but existing duplicates may persist in your history. I'll spend some times thinking about options for deduplication.
Thanks @garethgeorge . For my use case I’d be fine to just reinfect the whole repo. I know that might not be feasible for everyone though.
Are we saying we might just need to clear local cache, and re-connect the remote repo to clear all the extra "snapshots"? If that's the case, it's not a big deal, again in my case.
@garethgeorge
I see this has been address in the 1.7.3 release.
How best do we proceed with clearing duplicated snapshots in lists?
A bit late on this, https://github.com/garethgeorge/backrest/releases/tag/v1.8.0 adds a migration that will delete duplicated entries if you haven't yet reset your local db.