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

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

Re: [rdiff-backup-users] stupid, stupid question, but necessary to know


From: Chris Wilson
Subject: Re: [rdiff-backup-users] stupid, stupid question, but necessary to know answer
Date: Sun, 6 Aug 2006 20:13:28 +0100 (BST)

Hi Maarten and Ty,

On Fri, 4 Aug 2006, Maarten Bezemer wrote:

It's not always known beforehand what the source contains. Since
rdiff-backup is already checking for other filesystem capabilities, it
would make some sense to check for and escape directories (or
files!!) named rdiff-backup-data as well, so that they wouldn't interfere
with the rdiff-backup program. After all, why should anyone using the
source tree know that it's being backed up by rdiff-backup? Even moreso:
how *could* they know e.g. when an ISP is backing up their customer's
files using rdiff-backup. The contents of the source tree should have no
influence on the way rdiff-backup behaves.

I think there is a misunderstanding here. If you back up directory /foo to directory /bar using rdiff-backup, then the rdiff-backup-data directory is created under /bar, not /foo.

So if the ISP is backing up someone's home directory using rdiff-backup, the user will not see any rdiff-backup-data directory inside their home directory.

The presence of an rdiff-backup-data directory inside some directory /bar should be taken to mean that the contents of /bar MUST NOT BE MODIFIED IN ANY WAY except by running "rdiff-backup /foo /bar". Any changes to /bar not made by rdiff-backup will corrupt the mirror and prevent accurate restores.

This is one reason why Ty Boyack should not treat his rdiff-backup destination directory as an alternative which he can just "swap in" to replace the source directory if it becomes unavailable for some reason.

Not only will his users be confused by the sudden appearance of an rdiff-backup directory, but if they make any changes at all to the newly appeared filesystem, rdiff-backup will become confused and his backups will become worthless.

Depending on the capabilities of the destination filesystem and the rights of the user performing the backup, there may be other differences between the original and the mirror; for example, some characters in file names may be escaped, or file ownership and permissions may be different.

rdiff-backup is a backup tool which preserves history, not a mirroring tool, and it like any tool it can be abused. I would advise Mr Boyack to keep his rdiff-backups WELL AWAY from his users, and instead make a separate, identical mirror of his main filesystem to use as a swap-in backup, perhaps using rsync or an inotify-based tool, for example.

The fact that rdiff-backup creates a mirror, which happens to use the same filenames (if possible) and store the latest version of the mirrored data verbatim and uncompressed, should be treated solely as a convenience for emergency restoration of the latest versions of files without access to the rdiff-backup tool. It should NOT be misunderstood as a license to make any kind of changes to that directory with impunity, or a guarantee that the original and mirror are identical (apart from the rdiff-backup-data directory in the mirror).

I'm beginning to feel that this mirroring feature, while nice at first sight, actually presents a danger of users making unwarranted and unjustified assumptions that the mirror will be an exact mirror, and modifiable. I would be somewhat more comfortable if it was less obviously similar, for example if every filename was preceded with a special character such as "." or "_".

Now, when issuing this command, rdiff-backup goes to find its
rdiff-backup-data directory. My question was: How is this done?

I don't have the exact answer, but I guess that rdiff-backup recurses up the directory tree until it finds an rdiff-backup-data, or runs out of directories to recurse into.

I don't know what happens if you try to back up an rdiff-backup destination directory (including rdiff-backup-data) using rdiff-backup, but I suspect that it would be unwise to try. In any case, I don't see how it would give you any benefit over backing up that directory using rsync.

Cheers, Chris.
--
_ ___ __     _
 / __/ / ,__(_)_  | Chris Wilson <0000 at qwirx.com> - Cambs UK |
/ (_/ ,\/ _/ /_ \ | Security/C/C++/Java/Perl/SQL/HTML Developer |
\ _/_/_/_//_/___/ | We are GNU-free your mind-and your software |





reply via email to

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