Bug 9749 - hardlinkes files are copies instat of make a link
hardlinkes files are copies instat of make a link
Product: rsync
Classification: Unclassified
Component: core
x86 Linux
: P3 major
: ---
Assigned To: Wayne Davison
Rsync QA Contact
Depends on:
  Show dependency treegraph
Reported: 2013-03-28 20:10 UTC by Dieter Ferdinand
Modified: 2013-05-20 00:08 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Dieter Ferdinand 2013-03-28 20:10:21 UTC
i have a big problem with my backups because rsync don't make hardlinks in this situation:
old dirs:
new dirs:
all files in directory a are hardlinks to files in directory b

if a new dir have hardlinks to files, which are in directories, which are processed after the new directory, no hardlink was made, all files are copied!

i think, this is because rsync don't check if the file have hardlinks or if it find hardlinks and don't no at this point where the other link is and if it should be in a dir, which ist backuped.
so rsync copy the file without need instat of make a link and before rsync can read the other link, my backup-drive is full und backup break!

my command line: 
rsync -l -H -r -t -D -p -v -P --force --timeout=3600 -H --link-dest=/hd/backup2/amd-k8-daten2/mpeg//03 --link-dest=/hd/backup2/amd-k8-daten2/mpeg//02 --link-dest=/hd/backup2/amd-k8-daten2/mpeg//01 --link-dest=/hd/backup2/amd-k8-daten2/mpeg//03/ /hd/daten2/mpeg/ /hd/backup2/amd-k8-daten2/mpeg//04/

i try to find a option to read all fileinformation before backup is started, bat i don't find one.

at the time, i use rsync first time for backup, i remember, that rsync first read complete path and then copy the files, this will be slowers as the incremental method, but for hardlinks, i think, this method is better.

Comment 1 Wayne Davison 2013-05-20 00:08:25 UTC
Perhaps you have a huge directory tree?  If so, you can only guarantee that rsync won't copy a file that is (much) later found to be a hard-link if you specify --no-inc-recursive, since that forces rsync to check the whole of the directory tree prior to doing work.

If that is not the issue, you can re-open this bug and supply more info.