Atomic operations in rsync

shmerl shtetldik at gmail.com
Thu May 15 22:47:51 GMT 2008


I have to move files from one host to another atomically (as much as
possible). I saw that rsync can remove files from the source, and it also
has a --delay-updates option for "more atomic" operation.

I.e. I use it like this: rsync --delay-updates --remove-source-files $1 $2

My question is, what happenes first - does the file appear in destination
(i.e. mv from ~tmp~ to dest), and then removed at the source host, or it is
first removed and the source and then is moved from ~tmp~ to dest? This is
important for scenarios of crashes and disruptions.

Also, is there any way to set up in order in which files will be moved from
~tmp~ to dest, if --delay-update is used? What actual order is used by
default?

Thanks.
-- 
View this message in context: http://www.nabble.com/Atomic-operations-in-rsync-tp17264159p17264159.html
Sent from the Samba - rsync mailing list archive at Nabble.com.



More information about the rsync mailing list