On Wed, May 07, 2008 at 11:03:15AM +0100, Wayne Stallwood wrote:
On Wed, 2008-05-07 at 10:28 +0100, Chris G wrote:
I currently use a mix of rsync and rdiff-backup to backup my home system.
The basic backup is an rdiff-backup of all of /home to the NAS server in the garage.
*However* (and it's a big however) this has one huge hole in it, rdiff-backup does *not* copy the 'contents' of symbolic links. All it does (if you tell it to) is to copy the symbolic link leaving it on the resulting backup as a symbolic link which points at nothing.
Yes assuming that even with the --enable-symbolic-links option it only does what you say and copies the link then it does appear that rdiff-backup does not follow links nor is there an option to allow this.
However I think rdiff-backup uses librsync and rsync itself does have the capability to transform/follow links so I would imagine it would be a pretty trivial change to rdiff-backup to make it do this.
It's not *that* trivial to change, I've just taken a look at the code.
At first glance it's not too bad as there's a copy() function which essentially switches on the file type (regular file, directory, symlink, etc.) and acts accordingly. So one could change the symlink action to copy what it points at rather than just the symlink.
However it gets messy because ACLs, permissions, etc. are done separately and each has a check for symlink, handling symlinks (which are no longer symlinks) for these cases is difficult.
rdiff-backup only uses librsync at the very lowest level to work out the minimum data transfer to update a file as far as I can see.