Configure multiple repositories

I’d like to request the possibility of storing the same data in multiple repositories when creating a snapshot. Ideally, I’d like to store a local copy of the data in a local repository (maybe with a policy to keep fewer versions), and also push it to multiple remotes, which would be shared between multiple machines.

I know about repository sync-to, but if I understand it correctly, it won’t work well in this case. If I don’t use --delete no-one will clean up snapshots from the remote. If I use it, one machine will delete snapshots from other machines. Or am I not understanding something?

Thanks,
Pescuma

This is exactly what sync-to is designed to do. The repo you setup in Kopia is your “main” repo and sync-to then copies all files from your main repo to whatever secondary repos you want. You can use sync-to with as many secondary repos that you want. Using --delete ensures all secondary repos stay 100% in sync with your main repo. If you don’t use --delete then secondary repos will retain blobs that the main repo has deleted already.

If you use KopiaUI, see https://kopia.discourse.group/t/how-to-automatically-sync-snapshots-to-multiple-repositories-with-kopiaui/

But if you have 2 different machines using sync-to to the same remote repo and using --delete, won’t one machine delete the data from the other?

I am not quite familiar with how Kopia keeps track of blobs when multiple sources sync to the same repo. Presumably, Kopia keeps tracks of when the same blob is used by multiple sources and therefore would not get rid of the blob when using --delete for sync-to if one source deleted the data and the other does not.

Someone else will have to jump in here to confirm.

Do not use sync-to to the same repository from distinct machines. sync-to is a simple copy tool.

If you want to backup different computers and still benefit from deduplication, you need to run dedicated kopia server (kopia in server mode) where you have to create distinct users and then use them on each remote computers that will push backup to central repository (into kopia server) that holds snapshots for all computers.

sync-to used to create “backups of primary repository” (main repository copied to multiple off/on site locations).