--link-dest copying modified files

Wayne Davison wayned at samba.org
Tue Jan 23 15:39:31 GMT 2007

On Tue, Jan 23, 2007 at 01:41:55PM +0000, it-rsync at ml.epigenomics.com wrote:
> This works except when an existing file has been modified and is now
> "new" (and not the n'th hardlink) in the image. This file is copied to
> the "current" directory. A hardlink pointing to the file in lastimg is
> not created.

That's exactly right.  Rsync never looks for an alternate file when a
destination file exists.  It is expected that the --link-dest option
will be used with an empty hierarchy of files, otherwise it will be
sub-optimal, and any attribute changes it makes can affect the older,
hard-linked file versions, which is not usually what you want.

You're better off maintaining a symlink named "current" that points to
the most recent directory.  Either that, or rename the dirs after the


More information about the rsync mailing list