Soft link trouble with rsync on SGI

Jones, Matthew L (N-Scitor) matthew.l.jones at lmco.com
Fri Jan 23 22:12:08 GMT 2009


Thanks, Matt.  I will take a look at Unison.

Matt Jones
Lockheed Martin


-----Original Message-----
From: Matt McCutchen [mailto:matt at mattmccutchen.net] 
Sent: Friday, January 23, 2009 12:03 PM
To: Jones, Matthew L (N-Scitor)
Cc: rsync at lists.samba.org
Subject: Re: Soft link trouble with rsync on SGI

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.  :)

-- 
Matt



More information about the rsync mailing list