[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [rdiff-backup-users] Couple of problems
From: |
Ben Escoto |
Subject: |
Re: [rdiff-backup-users] Couple of problems |
Date: |
Tue, 16 Sep 2003 10:03:31 -0700 |
On Tue, 16 Sep 2003 09:01:00 +0100 Keith Edmunds <address@hidden> wrote:
> Recently I had a corrupted file on a Linux system - it went to zero
> bytes and the permissions were also zero. No problem: I'll restore it
> from the nightly rdiff-backup...
>
> The first problem was that I did not know when the file became
> corrupted. I needed a command which would show me all the different
> versions of that particular file which had been backed up, together with
> the size (and the date would be useful too). Unless I've missed
> something there is no such command available in rdiff-backup. I think
> this could be a useful addition.
Well, there is --list-increments, but that won't tell you the
increment sizes. You can also just
ls -l <dir>/rdiff-backup-data/increments/.../prefix*
which will give you some information, and perhaps you can tell when
the file was corrupted from the increment sizes. Unfortunately, the
actual sizes aren't readily available.
> The second problem was more subtle. When I found the problem (yesterday)
> I first changed the permissions on the real file (as opposed to the
> backup version), and when the backup ran last night it failed with
> "permission denied" error on the backup copy of this file. Observation
> 1: could this be a 'soft' error rather than stopping the whole backup?
> Today I tried a "--list-changed-since" of the backup directory and
> received the "Previous backup to xxx seems to have failed. Rerun
> rdiff-backup with --check-destination-dir option to revert directory to
> state before unsuccessful session." So I did that, but _that_ fails with
> "IOError: [Errno 13] Permission denied:
> '/--directory-path--/rdiff-backup.tmp.0'"
>
> I think I can see what is happening - rdiff-backup wants to change the
> permissions of a file to those which give it no access(!), but how do I
> overcome this? Should I use the --force parameter?
Hmm, are you using 0.12.4? There was a fix for a permissions error
that may cover this case. It's strange, that bug was in rdiff-backup
since 0.11.1 probably, but no one mentions it until 0.12.3, when at
least 3 people seem to have run into it.
> In summary, three questions:
>
> 1. Is there a way to list the history of changes for one given file,
> preferably with file sizes too?
Try, --list-increments, or just 'ls -l' in the increments directory
(the latter is actually more informative in this case).
> 2. If rdiff-backup has a problem backing up one file could it continue
> with the next?
Yes, there was a bug though.
> 3. How do I recover from the situation I'm currently in?
I'm not exactly sure what is going on in your case, but here are some
suggestions:
1. Try upgrading to 0.12.4 if you haven't already.
2. Try running as root, which will get you are the permission denied
errors (the bug fix only affected non-root users where the source
was root).
3. Make sure all the increments are readable. You can change the
permission of these manually without upsetting rdiff-backup's
regress mechanism.
4. Give me a bit more information, like the permissions of the
relevant increments, and maybe the traceback if rdiff-backup
fails. Are all the directories readable?
5. If you are in a hurry, you can always dispense with rdiff-backup
and restore the file "manually" by running rdiff repeatedly.
--
Ben Escoto
pgpHWuzXEM25Q.pgp
Description: PGP signature