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. When I do --itemize-changes, for that file, it says:>f+++++++++ panic-2012-02-01/home/darxus/0000_latest.jpg<@BasketCase> that shows the file isn't found < Darxus> Okay. I think I've pasted enough to show that it's there? <@BasketCase> it does seem strange I created some test files and verified that rsync -Ha --link-dest did correctly hard link those test files on that partition. # rsync --version rsync version 3.0.8 protocol version 30 # lsb_release -a Description: Ubuntu 11.10 Codename: oneiric It's an ext4 partition on a 4tb software raid0 composed of 2 2tb drives, which I just set up yesterday. Pretty sure none of that is relevant. -- "I'd rather be happy than right any day." - Slartiblartfast, The Hitchhiker's Guide to the Galaxy http://www.ChaosReigns.com
> rsync -Ha --link-dest=/media/4tb/bak/panic-2012-01-01 /media/2tb/bak/panic-2012-02-01 /media/4tb/bak/It seems that you may be attempting to hard-link between two file systems. One is mounted as "/media/4tb" the other is mounted as "media/2tb". My understanding is that it is not normally possible to hard-link between file systems. The following is quoted from the man page for the 'ln' command :> Hard links may not normally refer to directories and may not span file systems.Hopefully this information is helpful. --------------------------------------------------------------------- This email is protected by LBackup, an open source backup solution. http://www.lbackup.org
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.jpgBut 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
On Sun 22 Apr 2012, darxus at chaosreigns.com 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. > > When I do --itemize-changes, for that file, it says: > >f+++++++++ panic-2012-02-01/home/darxus/0000_latest.jpgThere is no file "panic-2012-02-01/home/darxus/0000_latest.jpg" in the --link-dest directory. There _is_ a home/darxus/0000_latest.jpg file, but that's not what's being looked for. Try modifying your command to: rsync -Ha --link-dest=/media/4tb/bak/panic-2012-01-01/ /media/2tb/bak/panic-2012-02-01/ /media/4tb/bak/panic-2012-02-01/ (Whenever in doubt, use trailing slashes :-) Paul