Best practice for rsync'ing a kopia repo?

Lets say I have a kopia repo at location A that I replicate to an off-site location B using rsync.

The rsync takes several days sometimes.

Is my kopia repo in location B potentially in a corrupt state until the rsync finishes?

The risk I have in mind is that if the rsync is running and location A bursts into flames and all data is lost, I am concerned location B’s copy might be unusable if rsync did not finish.

Is there a way to re-order the rsync to minimize the window of risk? Is it copy the data (p) and metadata (q) packs because they’re content addressable first, then do the much smaller indexes (x) (and everything else) to flip over to the new state?


rsync -av kopia-repo/p/. $REMOTE_HOST:kopia-repo/p/.
rsync -av kopia-repo/q/. $REMOTE_HOST:kopia-repo/q/.
rsync --delete -av kopia-repo/. $REMOTE:kopia-repo/.

I suppose a--link-destbased flow is a more bulletproof option but I’m curious about the above.

Why don’t you use kopia repo-sync instead?

1 Like

Oh. Well. Because I didn’t notice that sub-command before. Haha.

That seems to work fine, thanks!