Reciprocal Update

ms419 at ms419 at
Fri Jan 30 08:32:47 GMT 2004

If I run "rsync -ruv <local> <remote>" twice, no files are copied the 
second time - as expected. However, if I follow "rsync -ruv <local> 
<remote>" with "rsync -ruv <remote> <local>", all files are copied from 
<remote> to <local>.

I suspect this is because the timestamps of <remote> files are of when 
they were copied from <local> to <remote>, hence more recent than the 
last time they were edited on <local>, and consequently they are copied 
back to <local>.

I alternately edit files on both <local> and <remote>, so I must use 
rsync in both directions. Is there any way to prevent files copied to 
<remote> from being copied back to <local>, unless they've been 
modified in the meantime? Can rsync preserve the timestamp of an 
original when it is copied? Or perhaps update the timestamp of the 
original so it matches the copy?

For that matter, I run rsync in both directions every time I use it - 
to propagate changes in both directions. Can rsync instead be invoked 
once to perform a reciprocal update? To synchronize <local> and 
<remote> by copying updated files in both directions?



More information about the rsync mailing list