--link-dest isn't linking

Voelker, Bernhard bernhard.voelker at siemens-enterprise.com
Mon Apr 23 00:58:13 MDT 2012


darxus wrote:

> rsync -Ha --link-dest=/media/4tb/bak/panic-2012-01-01 /media/2tb/bak/panic-2012-02-01 /media/4tb/bak/
> 
> root at dancer:/media/4tb/bak# ls -l panic*/home/darxus/0000_latest.jpg
> -rw------- 15 darxus darxus 100772 1999-09-14 21:19 panic-2011-12-20/home/darxus/0000_latest.jpg
> -rw------- 15 darxus darxus 100772 1999-09-14 21:19 panic-2012-01-01/home/darxus/0000_latest.jpg
> -rw-------  1 darxus darxus 100772 1999-09-14 21:19 panic-2012-02-01/home/darxus/0000_latest.jpg
> 
> Why isn't it hard linking?  This is driving me nuts.

The man page says:
  If  file's  aren't  linking,  double-check their attributes.

> When I do --itemize-changes, for that file, it says:
> >f+++++++++ panic-2012-02-01/home/darxus/0000_latest.jpg

But that line says it's a new file, i.e. hardlinking should work.

Interestingly, the first 2 files have  link count of 15.
Where are the other hardlinks of that file? You can search
for the inode number e.g. with 
  find /media/4tb/bak -inum <inum> -ls

Have a nice day,
Berny


More information about the rsync mailing list