Bug 4531 - symlinks updating doesn't work properly during updates
Summary: symlinks updating doesn't work properly during updates
Alias: None
Product: rsync
Classification: Unclassified
Component: core (show other bugs)
Version: 2.6.3
Hardware: x86 All
: P3 critical (vote)
Target Milestone: ---
Assignee: Wayne Davison
QA Contact: Rsync QA Contact
Depends on:
Reported: 2007-04-21 13:24 UTC by Zak Mc Kracken
Modified: 2007-07-17 06:31 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Zak Mc Kracken 2007-04-21 13:24:48 UTC

  rsync -vrlKtpz --update --stats --progress -e ssh src/ dst/

I am updating files on destination, keeping the ones on dst/ that are more recent. 

Both under src and dst there is a symlink, however the one in dst has changed its target and has a more recent date. For me the latter is newer than the old one in src/

When I execute the command above the symlink in dst/ is reset to the old target It still has in src/.
Comment 1 Zak Mc Kracken 2007-04-21 13:35:23 UTC
One more thing that may be useful: system on src/ side is a Mandriva 06 with Linux 2.6.14 and ext3 and rsync 2.6.6. System on dst/ is Mac OS X 10.4 with HFS and rsync 2.6.3.
Comment 2 SPAMMER 2007-04-27 05:43:33 UTC
Created attachment 2451
Comment 3 Wayne Davison 2007-07-14 17:17:56 UTC
Symlinks are not affected by the --update option.  This option just affects file transfers.

One reason for this is that many systems cannot preserve the modification time of a symlink, so a copy of an old symlink can have a newer timestamp than a symlink that was created more recently (e.g. if more than 2 systems are involved in the coping process).

For multi-direction synchronization, I recommend using a tool designed for that purpose, such as unison.
Comment 4 Zak Mc Kracken 2007-07-17 06:31:15 UTC
(In reply to comment #3)
> Symlinks are not affected by the --update option.  This option just affects
> file transfers.

I understand the implementation problems that has lead to adopt such a behavior. However I think this is misleading and dangerous. I've lost some links this way and I needed to review a server configuration at hand. At least a warning message, such as "ignoring symlink date, considering the target date" would be good.