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

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

Re: [rdiff-backup-users] Re: Age old problem, how to 'archive' old data


From: Steven Willoughby
Subject: Re: [rdiff-backup-users] Re: Age old problem, how to 'archive' old data out of backups?
Date: Fri, 04 Sep 2009 10:22:12 -0600
User-agent: Thunderbird 2.0.0.23 (X11/20090817)

Chris G wrote:
Some very old stuff I want to keep but not others.

E.g. I have a ~/tmp directory which gets backup up, it would be nice
to be able to clear out ~/tmp *and* the backups of it.  I do want it
to be backed up but there's a fair chance that I don't want to keep
the backups for long.  There are other similar but less well defined
areas.

Another very obvious example is if one renames or moves a large chunk
of data.  I currently have my photographs catalogued and managed by
digikam, I'm thinking of renaming the root of my pictures now that
digikam can have multiple roots, if I do this I'll have 200Gb or so of
duplicated backup!

I want the ability to, for example, rename ~/pictures (the current
digikam tree) to, say, ~/images.  Then, once things have settled, I
want to be able to delete the backup of ~/pictures as eveything that
was there is now in ~/images.  OK, I'll lose any history but once I've
checked the new digikam tree is OK there's no history that I want or
need.


I believe you can just delete home-backup/rdiff-backup-data/increments/pictures/.

You'll get a big ugly warning if you ever try to restore one of these files you'll end up with empty files, but the restore will otherwise work. This at least seems to be true according to my testing [1], but please do your own testing before you abuse your backups like this.

If you wanted to preserve history you might be able to do some more sophisticated manipulation like renaming the "pictures" directory to "images" inside of the rdiff-backup-data directory and changing all instances in rdiff-backup-data/metadata*. If you're going to attempt something like this I'd suggest making a complete copy of your backup in case you make a mistake. (Use cp -al to do this in a space efficient manner.)

Steven

[1]: Here is my test case:

$ mkdir -p home/pictures/a
$ echo 1 > home/pictures/a/1
$ echo 2 > home/2
$ rdiff-backup home home-backup
$ mv home/pictures/ home/images/
$ rdiff-backup home home-backup
$ rm -r home-backup/rdiff-backup-data/increments/pictures/
$ rdiff-backup -r 1D home-backup/ test
Warning: Could not restore file pictures/a/1!

A regular file was indicated by the metadata, but could not be
constructed from existing increments because last increment had type
None.  Instead of the actual file's data, an empty length file will be
created.  This error is probably caused by data loss in the
rdiff-backup destination directory, or a bug in rdiff-backup
Warning: Hash da39a3ee5e6b4b0d3255bfef95601890afd80709 of pictures/a/1
doesn't match recorded hash e5fa44f2b31c1fb553b6021e7360d07d5d91ff5e!
$ find test
test
test/2
test/pictures
test/pictures/a
test/pictures/a/1
$ cat test/2
2




reply via email to

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