The Samba-Bugzilla – Bug 7668
Add --omit-link-times option, same purpose as --omit-dir-times
Last modified: 2011-09-28 20:17:09 UTC
When using rsnyc, files are always recreated (as the user performing the rsync) on the destination when the source file has a later mtime, regardless of changes. Symlinks however, are NOT recreated when the mtime differs; instead, the mtime is simply adjusted on the destination. This is problematic because a user who does not own a symlink can not adjust the mtime of that symlink to a time that isn't time(NULL) (now) - see utimes(2). Thus rsync fails with "failed to set times on...". The rest of the rsync completes, but scripts utilizing rsync may rely on the return codes.
This is likely the same reason that the --omit-dir-times option exists: it is not trivial (or necessary) to recreate a directory to update the mtime. I have a patch which adds the --omit-symlink-times option to rsync, I will submit it if anyone is interested in committing it.
You mean this?
author Wayne Davison <firstname.lastname@example.org>
Thu, 26 Aug 2010 15:50:05 +0000 (08:50 -0700)
committer Wayne Davison <email@example.com>
Thu, 26 Aug 2010 18:12:58 +0000 (11:12 -0700)
tree aefd03f05797d1b2dda9d2e27e1e64d92bdb79d6 tree
parent c9bf436e5b80ad7d001773e3d750149c11f39411 commit | diff
Add --omit-link-times and use CAN_SET_SYMLINK_TIMES less.
Yes, that is precisely the feature. When I first posted to the rsync mailing list about it on 08/06/2010, no one had stated that it was already being worked on or even planned.
I had meant to reply to your on-list email on this subject, but apparently forgot. I had been working on another symlink bug relating to time when your email prompted me to add the option you suggested (with a name more in keeping with rsync's other symlink-related options).
Thanks for the suggestion!
This ticket from 2010 describing the --omit-link-times seems to have been lost. The commit and change that Carlos lists in Comment 1 does not seem to be present in rsync-3.0.9 despite it being released a few days ago.
Has this change been reverted for some reason? The option would be quite useful.
New options are coming in 3.1.0.