--detect-moved patch and --link-dest

Matt McCutchen matt at mattmccutchen.net
Tue Mar 18 20:50:45 GMT 2008

On Fri, 2008-03-07 at 14:20 +0100, Matt wrote:
> I am using  --link-dest for my rotating backups.   Noticing the 
> "--detect-renamed-lax"  patch to rsync 3.0.0. I was hoping to make use 
> of the --detect-moved.  Unfortunately,  "--detect-moved" does not seem 
> to recognize the --linkdest option.  A moved file is getting transferred 
> again  and a new file is created  at the receiving end instead of 
> linking to the moved file.  Am I doing something wrong or is --link-dest 
> simply not supported by --detect-moved?

The latter: the --detect-* options only detect files in the destination
directory, not --*-dest directories.  Modifying rsync to scan --*-dest
directories too would take a considerable amount of additional code.

To accomplish what you want with the currently available tools, you
could prepopulate the destination with "cp -al" instead of using
--link-dest and then pass the --no-tweak-hlinked option implemented by
the following patch to avoid any attribute-tweaking issues:



More information about the rsync mailing list