rdiff-backup-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [rdiff-backup-users] Re: Can I make rdiff-backup follow symlinks?


From: Maarten Bezemer
Subject: Re: [rdiff-backup-users] Re: Can I make rdiff-backup follow symlinks?
Date: Wed, 7 May 2008 12:48:50 +0200 (CEST)

On Wed, 7 May 2008, Chris G wrote:
> On Wed, May 07, 2008 at 12:07:16PM +0200, Paul Bijnens wrote:
> > On 2008-05-07 10:55, Chris G wrote:

> >> I want it to copy *everything* in /home/chris, including stuff pointed
> >> to by symbolic links.  Otherwise I'm left with a backup which can have
> >> huge holes in it.
> >
> > And also hoping that no symbolic links will result in a circular
> > loop, generate huge amounts of data :-)
> >
> rsync manages it.

Do you want to follow all symlinks, or only those to regular files? At
least as far as I understand it from rsync's manpage, rsync only copies
_files_ that are pointed to by symlinks. Directories, sockets, etc.,
should in general not be copied, to prevent circular links as Paul already
pointed out.
So, rdiff-backup should determine the type of destination a symlink points
to, and copy or not copy the destination. It's going to take a while to
point that out clearly in the manual...
And.. what about this one: does the destination even exists at the time
rdiff-backup is run? Imagine pointing to files on different partitions or
NFS shares that aren't always available. That will most definitly ruin
your backup.

So, in general, I'd say that the option you want would give more problems
than it would solve. Both technically and conceptually. A symlink is
nothing more than that, just a link to some other place. If you want to
back up that other place, instruct rdiff-backup to do so.
Even "Windows symlinks" are just files, pointing to some other
location. Parsing those (if source filesystem is windows-based) would be a
lot harder, but necessary to implement if rdiff-backup needs to be a
general-purpose tool.

> > Why not adding the targets of the links to the rdiff-backup include
> > list?  Simple solution but avoiding major problems.
> >
> ... because next week I'll change one and the backup won't work again.

If you change one of the targets of your symlinks, rdiff-backup would go
and calculate a diff from the original file to the new file. It would save
history as "previously, this file had these contents", while in fact that
file never had those contents, or, put more mildly, that particular file
on disk never _changed_ from the previous contents to the current
contents.

If you change the targets of your symlinks, rdiff-backup now records those
changes, and shows history as "at that point in time, this link pointed to
that location".

And that's only about backing up and saving history. Restoring would be
even more horrific. Rdiff-backup would go and write the contents of the
previous target to the current target...

In short: Bad Idea (tm).


Regards,
 Maarten





reply via email to

[Prev in Thread] Current Thread [Next in Thread]