--link-dest behavior

Matthew Monaco dgbaley27 at verizon.net
Sat Oct 4 21:26:00 GMT 2008

In the event that --link-dest=DIR is the option taking on the new
behavior (and thus is affected by --delete), I think that the lines
given by --itemize-changes should not indicate the creation of "old"
directories.  (or there should be yet another option to suppress these.)

In the meantime - is there a way to itemize only a particular type of
change?  For example: files only, no dirs, or files with permission
updates only, etc?



The 'cp -al' method is what I'm currently doing as a workaround, but it
adds a few extra lines to my script because I need to check if the
destination connected to via ssh and then run the cp command over SSH
(which is a different cp command than it normally would be because the
ssh commands are relative to the users home directory...)

Matt McCutchen wrote:
> On Fri, 2008-10-03 at 01:14 -0400, Matthew Monaco wrote:
>> I've been thinking about the current behavior of the --link-dest=DIR
>> option.  In the absence of --delete, ALL members of DIR should be linked
>> to the destination (aside from those that are changed).  If not, there
>> should at least be a --no-link-dest-delete option.  (This latter option
>> might be better to avoid disrupting the behavior of current rsync commands)
> Interesting suggestion.  Currently, the meaning of --link-dest=DIR  is
> somewhere between "use DIR as an optimization" and "regard DIR as the
> previous version of the destination", and it is not ideally suited for
> either use case.  I have proposed splitting it into --link-basis-dir and
> --link-dest variants for the two meanings:
> https://bugzilla.samba.org/show_bug.cgi?id=5645
> The new --link-dest would itemize deletions with respect to the basis
> dir when --delete is on, even though nothing is actually being deleted,
> as separately proposed here:
> https://bugzilla.samba.org/show_bug.cgi?id=5263
> And, now that you mention it, I guess the new --link-dest should also
> hard-link in files from the basis dir that have no counterpart in the
> source when --delete is off.
> A currently possible way to get the same result as my hypothetical new
> --link-dest is to "cp -al" the basis dir to the destination first and
> then rsync to the destination.
> Matt

More information about the rsync mailing list