problems with --link-dest

Marten Lehmann lehmann at cnm.de
Tue Sep 7 10:55:37 GMT 2004


Hello,

> You're trying to make a sort of snapshot per day, where common files
> across days are hardlinked?

yes.

> Try this:
>     rsync -av -e ssh --delete --link-dest=$link_dest --compare-dest=$link_dest $src $dest
> 
> i.e. add the --compare-dest option...

--compare-dest and --link-dest aren't thought to be used together:

--link-dest compares and hardlinks files that aren't changed
--compare-dest compares and just only copies changed files

The way I got it working was to change

link_dest="root at vm2:/vrmd/admin/backup/web/2004-09-05"

to

link_dest="../2004-09-05"

Yes, that's the same I already posted. But when I posted it, I marked 
this way as "doesn't work" because rsync always hangs for a long time 
(20-30 secs) after it compared same files and I didn't notice, that it 
resumes after a while. But anyway: I don't understand why it causes such 
heavy load on the target server. If I'm running rsync for the first 
time, it is very fast (talking about 10 MB or so to transfer in total), 
but if I'm using --link-dest, it hangs (with >50% cpu load on the target 
server) and resumes after a while.

> Only difference is that I initiate the rsync from the backup server,
> instead of to it. That way the backup server is guaranteed to have only
> one rsync session running at a time, which is useful because this (here)
> is quite disk-intensive, and having more than one simultaneous rsync
> session would cause disk thrashing.

That's wise in a way. But I don't like the idea of having one server 
that has root-access to several others. I would be just too easy to 
compromise the remaining machines if the backup server would be 
compromised. How do you handle this? Or are you backing up a local 
intranet only?

Regards
Marten


More information about the rsync mailing list