problems with --link-dest

Paul Slootman paul at debian.org
Tue Sep 7 11:33:38 GMT 2004


On Tue 07 Sep 2004, Marten Lehmann wrote:
> 
> >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

Hmm, true :-) However, it doesn't hurt.

> 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 

Perhaps that's when the hard links are being made?

> 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?

It's on a separate network (all systems have 2 network cards).
In fact I changed over to using an rsync daemon on 2 systems
(nameservers) that were also accessible from the outside (even though
it's behind a firewall). The rsync daemon's modules are read-only and
only accept connections from the backup server (and only listen on the
backup network IP number).
The other systems do in fact allow root ssh (via a key) so the integrity
of the backup servers is indeed very important...


Paul Slootman


More information about the rsync mailing list