--compare-dest option

tim.conway at philips.com tim.conway at philips.com
Tue Jan 29 01:54:05 EST 2002

Here's an example.
dest = directory tree full of files all interdependent.  a change in one 
without the corresponding change in another makes the whole tree invalid.
If you just rsync the directory changes over, the tree is invalid from the 
first change is started until the last one is done.
To avoid this, you rsync to another directory in the same filesystem, 
using --compare-dest to point to the actual directory.
Once the new copy is finished, you rename the original to a temporary 
name, rename the new copy to the originals name (these two operations are 
nearly instantaneous), then recursively delete the original directory. 
This way, there is no time at all where the directory is invalid, and only 
maybe a millisecond where it doesn't exist.

Tim Conway
tim.conway at philips.com
Philips Semiconductor - Longmont TC
1880 Industrial Circle, Suite D
Longmont, CO 80501
Available via SameTime Connect within Philips, n9hmg on AIM
perl -e 'print pack(nnnnnnnnnnnn, 
".\n" '
"There are some who call me.... Tim?"

mertz.denis at free.fr
Sent by: rsync-admin at lists.samba.org
01/28/2002 06:02 AM

        To:     rsync at lists.samba.org
        cc:     (bcc: Tim Conway/LMT/SC/PHILIPS)
        Subject:        --compare-dest option

I'm translating rsync.1, and i'm having some problems with the
--compare-dest option description, actually i dont understand the part
which describes the usefulness of this option, it says :

This is  useful  for doing  transfers to a new destination while leaving 
existing files intact,  and  then  doing  a  flash-cutover  when  all
files  have  been  successfully transferred  (for  example  by  moving
directories around  and  removing  the  old directory, although this
requires also doing the transfer  with -I  to avoid  skipping  files
that haven´t changed). 

If someone could explain me this (especially the flash-cutover thing) ,
maybe with a little example, it would greatly help me for the translation. 

Thanks in advance


More information about the rsync mailing list