Can Rsync do this?

Paul Slootman paul at debian.org
Thu Jul 14 12:52:51 GMT 2005


On Thu 14 Jul 2005, Stuart Halliday wrote:
> 
> The program in question has a settings directory so I thought I could get Rsync to sync this directory between the two machines.
> 
> But Rsync seems to always force the files on the Rsync server to go to the slave regardless that the slave has the most upto date file time-wise.

That's the point of rsync: make the destination the same as the source.

> So I guess I need a way for Rsync to compare the two directories and if one file is more recent than the other then force the older file to be overwritten by the most recent regardless of which location it is in.

You could either use the --update option, or (perhaps better suited to
your situation) have a look at unison, which is meant to keep two
systems in sync, regardless of where changes take place (so long there
aren't any conflicts, of course).


Paul Slootman


More information about the rsync mailing list