On Sun, Jul 31, 2005 at 12:18:49AM -0400, Nathan Bullock
wrote:> When I try to rsync a directory using --link-dest it never creates
> hardlinks.
This may be because you don't have --link-dest pointing at the right
files (perhaps try an absolute path). It might also be that the files
don't match in all the preserved attributes (e.g. time, permissions,
group, if enabled), and rsync is copying the data. Use the -i option
to see what rsync thinks is going on -- you'll see a 'l' (local)
flag
if the file was copied from a local file in order to be able to set
different attributes than those that exist in the link-dest files.
> shouldn't these lines be: [...]
No. If the ignore_times var is set, the files can't be unchanged -- the
-I option tells rsync to treat all files as changed, so using -I with
--link-dest will never allow anything to be hard-linked together (though
rsync can still use the link-dest files for a local source of data). As
for cmp_modtime(), that function returns 0 if the times match, so the
files can only be unchanged if cmp_modtime() returns 0.
..wayne..