This is a bug, right? (--link-dest)

Matt McCutchen matt at mattmccutchen.net
Mon Apr 5 15:47:52 MDT 2010


On Mon, 2010-04-05 at 16:38 -0500, Randall Cotton wrote:
> ----- Original Message ----- 
> From: "Matt McCutchen" <matt at mattmccutchen.net>
> To: "Randall Cotton" <recotton at earthlink.net>
> Cc: <rsync at lists.samba.org>
> Sent: Monday, April 05, 2010 4:16 PM
> Subject: Re: This is a bug, right? (--link-dest)
> 
> 
> : On Mon, 2010-04-05 at 13:57 -0500, Randall Cotton wrote:
> : > This works as expected (a hard link is made)
> :
> : > rsync -a --link-dest=../a.1 a/ b/a
> :
> : > This does not (a copy is made instead of a hard link)
> :
> : > rsync -a --link-dest=a.1 a b
> :
> : Not a bug.  The --link-dest argument needs to be given relative to the
> : destination directory, even if the destination directory is given
> : without a trailing slash.
> 
> Matt,
> 
> Thanks for your response.
> 
> But I was aware of this requirement and I don't think I made an error in
> this respect: [...]

You're right.  Forget my previous message.  For some reason I was
thinking "a" was not a directory.

The problem is that in the second command, the "a" path component is
included in file-list paths.  Hence, rsync will look for the basis file
for b/a/tmp at b/a.1/a/tmp instead of b/a.1/tmp .

-- 
Matt



More information about the rsync mailing list