Unexpected behavior with --hard-links and --ignore-existing
wayned at samba.org
Tue Jan 3 21:07:47 MST 2012
On Tue, Dec 27, 2011 at 4:25 AM, Benjamin Pflugmann <
benjamin-rsync at pflugmann.de> wrote:
> Summary: When (repeatedly) running rsync with --hard-links and
> --ignore-existing, new hard links are copied instead of linked.
Yeah, it's a side-effect of how the skipping is encoded. All existing
files are skipped before checking if they are up-to-date or not, so they
are not considered as potential link choices.
To change this, the code would need to be changed to remove the current
skip-existing check and add in duplicate versions of it into every code
path right after we figure out that this thing isn't up-to-date (e.g. in
the symlink code, in the file code, in the device code, in the special-file
code). That would let a non-up-to-date file get marked as skipped, but an
up-to-date file get left as valid, but just not treated as a normal
transfer file (since it's supposed to be getting skipped).
This is not something I plan to tweak in the code at this time.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rsync