Soft link trouble with rsync on SGI
matt at mattmccutchen.net
Fri Jan 23 19:02:43 GMT 2009
On Fri, 2009-01-23 at 09:57 -0700, Jones, Matthew L (N-Scitor) wrote:
> I have 2 machines and I run 2 rsync commands from one of them to keep
> them in synch. First I rsync to the remote box and have it send the
> local side all new stuff (rsync –auvz) and then I rsync from the local
> box and send the local new stuff back. This works really well for
> standard files and directories… but it breaks on soft links. On the
> first rsync I will get an older link from the remote site copied over
> a newer link on the local side. It seems to always synch the links as
> opposed to comparing the age.
This is by design: the man page description for --update says that it
only applies to regular files. I believe the original rationale was
that regular files are the only files for which mtimes are both
meaningful and arbitrarily settable, but perhaps that should be
reconsidered now that Linux can set symlink mtimes.
In any case, rsync is not designed for two-way synchronization. The
recommended solution is to use Unison
( http://www.cis.upenn.edu/~bcpierce/unison/ ).
> I will check the mailing list, but please feel free to e-mail me
> directly. Best for me would be to send to both.
Sending to both is in fact my default behavior. :)
More information about the rsync