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
[EMAIL PROTECTED]
303.682.4917
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, 
19061,29556,8289,28271,29800,25970,8304,25970,27680,26721,25451,25970), 
".\n" '
"There are some who call me.... Tim?"




[EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED]
01/28/2002 06:02 AM

 
        To:     [EMAIL PROTECTED]
        cc:     (bcc: Tim Conway/LMT/SC/PHILIPS)
        Subject:        --compare-dest option
        Classification: 



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

Denis








Reply via email to