SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
Trouble restoring, files created then deleted?
Author Message
Post Trouble restoring, files created then deleted? 
Jeff Lessem <Jeff.Lessem < at > Colorado.EDU>
wrote the following on Thu, 22 Sep 2005 17:53:43 -0600
I'm trying to restore some backups created a long time ago, with an old
version of rdiff-backup, and I am getting a strange error. Files are
created, then deleted, and then rdiff-backup complains that the file
doesn't exist. This backup is from July 31, 2002. The backup was
probably created with whatever rdiff-backup release was current at that
time.

I see the problem with rdiff-backup 0.13.4 from Debian, and I get the
same error with rdiff-backup 1.0.1 with Python 2.3 and 2.4.

It seems to be happening (or, this is my current theory) with files that
did not exist at the time of the original backup, but were later added
to the archive. The first file here is dated December, 2002, so it
wouldn't have existed in the original July, 2002 archive, but only added
later.

Any advice on what to do? Should I roll back to an old version of
rdiff-backup to do these restores?

I'm happy to provide any additional information.

This is the relevant part of the traceback:

Thu Sep 22 17:50:47 2005 Processing changed file 5229_HomewoConsultancy_OU_25-Nov-02(final)2.doc
Thu Sep 22 17:50:47 2005 Regular copying ('5229_HomewoConsultancy_OU_25-Nov-02(final)2.doc',) to home/rdiff-backup.tmp.13
Thu Sep 22 17:50:47 2005 Renaming home/rdiff-backup.tmp.13 to home/5229_HomewoConsultancy_OU_25-Nov-02(final)2.doc
Thu Sep 22 17:50:47 2005 Deleting home/5229_HomewoConsultancy_OU_25-Nov-02(final)2.doc

Hmm that is weird. The backups were from before rdiff-backup made
mirror_metadata files, so that could be part of the problem. Can you
do an ls -l on the relevant increments and mirror files? Like for the
home/5229...doc file, could you do a:

ls -l <destdir>/home/5229...doc
ls -l <destdir>/rdiff-backup-data/increments/home/5229...doc*

Also, can you restore the file "manually"? The current version should
be at <destdir>/home/5229...doc, so just copy that over. Then there
should be some diffs in the
<destdir>/rdiff-backup-data/increments/home dir, you can unzip those
and apply them with rdiff in reverse chronological order.

So depending on the number of files it may be easier to restore them
"manually" or to use an earlier version.


--
Ben Escoto

Post Trouble restoring, files created then deleted? 
In your message of: Mon, 17 Oct 2005 23:26:54 CDT, you write:
Thu Sep 22 17:50:47 2005 Processing changed file 5229_HomewoConsultancy_=
OU_25-Nov-02(final)2.doc
Thu Sep 22 17:50:47 2005 Regular copying ('5229_HomewoConsultancy_OU_25-=
Nov-02(final)2.doc',) to home/rdiff-backup.tmp.13
Thu Sep 22 17:50:47 2005 Renaming home/rdiff-backup.tmp.13 to home/5229_=
HomewoConsultancy_OU_25-Nov-02(final)2.doc
Thu Sep 22 17:50:47 2005 Deleting home/5229_HomewoConsultancy_OU_25-Nov-=
02(final)2.doc

Hmm that is weird. The backups were from before rdiff-backup made
mirror_metadata files, so that could be part of the problem. Can you
do an ls -l on the relevant increments and mirror files? Like for the
home/5229...doc file, could you do a:

ls -l <destdir>/home/5229...doc

-rw------- 1 home hewitt 104448 2002-12-02 11:48 home/docs/5229_HomewoConsultancy_OU_25-Nov-02(final)2.doc


ls -l <destdir>/rdiff-backup-data/increments/home/5229...doc*

-rw------- 1 root root 0 2002-12-03 02:07 rdiff-backup-data/increments/home/docs/5229_HomewoConsultancy_OU_25-Nov-02(final)2.doc.2002-12-02T00:47:28-06:00.missing

That is odd, because the file is still there, I mean, it was never
deleted from the original location. Of course it might have been mv-ed
and then mv-ed back or something so it was missing on the 2002-12-03,
but was then replaced later with the original date and time.

My real goal here is to reduce my daily incremental backups into monthly
incremental backups for some of my old archives, so manually recovering
a particular file isn't that important.

I built rdiff-backup 0.10.1, which seems to require python2.2 and
changing #include <rsync.h> to <librsync.h>, because that looked to me
like the last version that didn't use metadata files. I'm now getting a
different error:

File "/usr/local/lib/python2.2/site-packages/rdiff_backup/rdiff-backup", line 24, in ?
rdiff_backup.Main.Main(sys.argv[1:])
File "/usr/local//lib/python2.2/site-packages/rdiff_backup/Main.py", line 229, in Main
take_action(rps)
File "/usr/local//lib/python2.2/site-packages/rdiff_backup/Main.py", line 207, in take_action
elif action == "restore-as-of": RestoreAsOf(rps[0], rps[1])
File "/usr/local//lib/python2.2/site-packages/rdiff_backup/Main.py", line 380, in RestoreAsOf
restore_common(rpin, target, time)
File "/usr/local//lib/python2.2/site-packages/rdiff_backup/Main.py", line 390, in restore_common
Restore.Restore(inc_rpath, mirror, target, time)
File "/usr/local//lib/python2.2/site-packages/rdiff_backup/restore.py", line 45, in Restore
rest_time, mirror_time)
File "/usr/local//lib/python2.2/site-packages/rdiff_backup/restore.py", line 130, in restore_recursive
rcd.RestoreFile()
File "/usr/local//lib/python2.2/site-packages/rdiff_backup/restore.py", line 337, in RestoreFile
for inc in self.inc_list: self.applyinc(inc, self.target)
File "/usr/local//lib/python2.2/site-packages/rdiff_backup/restore.py", line 361, in applyinc
raise RestoreError("Bad increment sequence at " + inc.path)
rdiff_backup.restore.RestoreError: Bad increment sequence at /old/backup/rdiff/home/rdiff-backup-data/increments/userfoo/MH-Mail/inbox/,1895.2003-09-28T00:31:23-06:00.diff.gz

I don't expect anybody to go fixing bugs in an ancient version of
rdiff-backup, if that is what this is. Can I simply remove any bad
increments? I would rather remove a few bad files, than lose the entire
archive.

--
Thanks,
Jeff Lessem.

Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  


Magic SEO URL for phpBB