Problem with hard links
Cenedese at indel.ch
Fri Sep 28 09:14:11 GMT 2007
At 09:50 28.09.2007 +0200, limule pika wrote:
>I have a problem with rsync and hard links :
>I have 1 folder : P, with 2 subfolders : S1 and S2
>S2 contains a lot of hard links to file stored in folder S1.
> P : -S1
> -S2 (S2 files hard links to S1 files)
>I would like to rsync the folder P to another computer, but each sub folder S1 (110 Go) and S2 (10 Go + hard link to 100 Go of S1) contains thousands of thousands of files, and when i try to rsync the folder P i have an out of memory error.
>The command used is : rsync --recursive --hard-links -e ssh --stats --delete --links --perms --times
>So i try to rsync the subfolder S1 and S2 in two rsync commands (with same argument as above), and then the hard links between S2 and S1 are not preserved.
>Is there a solution to keep the hard links between S2 and S1 when running two separated command ?
I don't know an answer to this, but if possible you can use an rsync from cvs.
The actual development version uses incremental file list (in remote mode
both rsync binaries have to support this). This should save you from the
memory problems and you can do it in one step.
More information about the rsync