We have a RPM repository (on a Centos 6 machine) that we need to push to another machine. So far we've been using rsync -av --delete
to simply push the repo directory over the network. This makes the remote repository unusable during the sync - before rsync
finishes, repodata
don't match the present rpm packages and the synchronization of repodata
is also not atomic.
How can I synchronize two repositories atomically over ssh?
I would like the remote repository to be usable at any time, even during the transfer of data. I know I could achieve this copying the repo to a temporary directory, and then moving/symlinking it, but it feels like there should be a better solution.