Re: [rdiff-backup-users] unable to recover from interrupted backup

2009-08-25 Thread Dominic Raferd

Ben Tucker wrote:

I had a machine fail in the midst of backing up a couple weeks ago and
ever since I have been unable to get it to successfully backup.
rdiff-backup --check-destination-dir runs without error, but then
running the actual backup command results in an exception.  I'm
running 1.2.8 stock deb install on Ubuntu jaunty.  The client machine
is also running 1.2.8 (also ubuntu).  These are the only versions of
rdiff-backup with have been used.  I'd greatly appreciate any pointers
on how to resolve this.  Thanks!
  
Did you get this sorted? It sounds an alarming problem for any of us who 
have important repositories of data going back over a long period; the 
whole thing could get trashed by one failed backup!


I give below a way (posted here by Steven a few weeks ago, all credit to 
him) to force a regression. This might undo the 'bad' backup(s) that you 
have and then allow you to make further backups. I haven't had the need 
to try it but it might help you:


Dominic

While rdiff-backup is making a backup it creates a new 
current_mirror.$timestamp.data file in the rdiff-backup-data 
destination directory.  Once it's done making the backup, it deletes the 
old current_mirror file.  In other words, while the backup is running 
there are two current_mirror files. In order to undo a backup, you'll 
need to to create a fake current_mirror file with the timestamp of the 
previous backup and run rdiff-backup -v6 --check-destination-dir 
$dest.  rdiff-backup will be fooled into thinking the latest backup 
failed and revert it.


I do not know of a way to regress more than one backup at once, but this 
method should work multiple times.


P.S. A full example in case my description isn't clear:

$ mkdir source

$ echo 1  source/a

$ echo 2  source/b

$ rdiff-backup source dest

$ ls dest
a  b  rdiff-backup-data

$ rm source/a

$ rdiff-backup source dest

$ ls dest
b  rdiff-backup-data

$ ls dest/rdiff-backup-data/mirror*
dest/rdiff-backup-data/mirror_metadata.2009-07-03T18:47:33-06:00.diff.gz
dest/rdiff-backup-data/mirror_metadata.2009-07-03T18:48:12-06:00.snapshot.gz 



$ echo PID 99  \
dest/rdiff-backup-data/current_mirror.2009-07-03T18:47:33-06:00.diff.gz

$ rdiff-backup -v6 --check-destination-dir dest
Using rdiff-backup version 1.2.7
... snip ...
Regressing to Fri Jul  3 18:47:33 2009
... snip ...
Regressing file a
... snip ...
Cleaning up

$ ls dest
a  b  rdiff-backup-data



___
rdiff-backup-users mailing list at rdiff-backup-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki


Re: [rdiff-backup-users] unable to recover from interrupted backup

2009-08-25 Thread Dominic Raferd

Ben Tucker wrote:

I had a machine fail in the midst of backing up a couple weeks ago and
ever since I have been unable to get it to successfully backup.
rdiff-backup --check-destination-dir runs without error, but then
running the actual backup command results in an exception.  I'm
running 1.2.8 stock deb install on Ubuntu jaunty.  The client machine
is also running 1.2.8 (also ubuntu).  These are the only versions of
rdiff-backup with have been used.  I'd greatly appreciate any pointers
on how to resolve this.  Thanks!
Did you get this sorted? It sounds an alarming problem for any of us who 
have important repositories of data going back over a long period; the 
whole thing could get trashed by one failed backup!


I give below a way (posted here by Steven a few weeks ago) to force a 
regression. This might undo the 'bad' backup(s) that you have and then 
allow you to make further backups. I haven't had the need to try it but 
it might help you:


Dominic

While rdiff-backup is making a backup it creates a new 
current_mirror.$timestamp.data file in the rdiff-backup-data 
destination directory.  Once it's done making the backup, it deletes the 
old current_mirror file.  In other words, while the backup is running 
there are two current_mirror files. In order to undo a backup, you'll 
need to to create a fake current_mirror file with the timestamp of the 
previous backup and run rdiff-backup -v6 --check-destination-dir 
$dest.  rdiff-backup will be fooled into thinking the latest backup 
failed and revert it.


I do not know of a way to regress more than one backup at once, but this 
method should work multiple times.


P.S. A full example in case my description isn't clear:

$ mkdir source

$ echo 1  source/a

$ echo 2  source/b

$ rdiff-backup source dest

$ ls dest
a  b  rdiff-backup-data

$ rm source/a

$ rdiff-backup source dest

$ ls dest
b  rdiff-backup-data

$ ls dest/rdiff-backup-data/mirror*
dest/rdiff-backup-data/mirror_metadata.2009-07-03T18:47:33-06:00.diff.gz
dest/rdiff-backup-data/mirror_metadata.2009-07-03T18:48:12-06:00.snapshot.gz 



$ echo PID 99  \
dest/rdiff-backup-data/current_mirror.2009-07-03T18:47:33-06:00.diff.gz

$ rdiff-backup -v6 --check-destination-dir dest
Using rdiff-backup version 1.2.7
... snip ...
Regressing to Fri Jul  3 18:47:33 2009
... snip ...
Regressing file a
... snip ...
Cleaning up

$ ls dest
a  b  rdiff-backup-data



___
rdiff-backup-users mailing list at rdiff-backup-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki


[rdiff-backup-users] unable to recover from interrupted backup

2009-08-21 Thread Ben Tucker
I had a machine fail in the midst of backing up a couple weeks ago and
ever since I have been unable to get it to successfully backup.
rdiff-backup --check-destination-dir runs without error, but then
running the actual backup command results in an exception.  I'm
running 1.2.8 stock deb install on Ubuntu jaunty.  The client machine
is also running 1.2.8 (also ubuntu).  These are the only versions of
rdiff-backup with have been used.  I'd greatly appreciate any pointers
on how to resolve this.  Thanks!

-Ben

Full output:

$ rdiff-backup --exclude-other-filesystems --print-statistics ruby2::/
/var/cache/rdiff-backup/ruby2

/var/lib/python-support/python2.6/rdiff_backup/SetConnections.py:148:
DeprecationWarning: os.popen2 is deprecated.  Use the subprocess
module.
  stdin, stdout = os.popen2(remote_cmd)
Previous backup seems to have failed, regressing destination now.
Warning: expected /var/cache/rdiff-backup/ruby2/tmp/passenger.12237 to
be a directory but found None instead.
This is probably caused by a bug in versions 1.0.0 and earlier.
Exception '('tmp', 'passenger.12237')' raised of class 'type
'exceptions.KeyError'':
  File /var/lib/python-support/python2.6/rdiff_backup/Main.py, line
304, in error_check_Main
try: Main(arglist)
  File /var/lib/python-support/python2.6/rdiff_backup/Main.py, line
324, in Main
take_action(rps)
  File /var/lib/python-support/python2.6/rdiff_backup/Main.py, line
280, in take_action
elif action == backup: Backup(rps[0], rps[1])
  File /var/lib/python-support/python2.6/rdiff_backup/Main.py, line
343, in Backup
backup.Mirror_and_increment(rpin, rpout, incdir)
  File /var/lib/python-support/python2.6/rdiff_backup/backup.py,
line 51, in Mirror_and_increment
DestS.patch_and_increment(dest_rpath, source_diffiter, inc_rpath)
  File /var/lib/python-support/python2.6/rdiff_backup/backup.py,
line 243, in patch_and_increment
ITR(diff.index, diff)
  File /var/lib/python-support/python2.6/rdiff_backup/rorpiter.py,
line 280, in __call__
if last_branch.can_fast_process(*args):
  File /var/lib/python-support/python2.6/rdiff_backup/backup.py,
line 520, in can_fast_process
mirror_rorp = self.CCPP.get_mirror_rorp(index)
  File /var/lib/python-support/python2.6/rdiff_backup/backup.py,
line 471, in get_mirror_rorp
except KeyError: return self.get_parent_rorps(index)[1]
  File /var/lib/python-support/python2.6/rdiff_backup/backup.py,
line 453, in get_parent_rorps
raise KeyError(index)

Traceback (most recent call last):
  File /usr/bin/rdiff-backup, line 30, in module
rdiff_backup.Main.error_check_Main(sys.argv[1:])
  File /var/lib/python-support/python2.6/rdiff_backup/Main.py, line
304, in error_check_Main
try: Main(arglist)
  File /var/lib/python-support/python2.6/rdiff_backup/Main.py, line
324, in Main
take_action(rps)
  File /var/lib/python-support/python2.6/rdiff_backup/Main.py, line
280, in take_action
elif action == backup: Backup(rps[0], rps[1])
  File /var/lib/python-support/python2.6/rdiff_backup/Main.py, line
343, in Backup
backup.Mirror_and_increment(rpin, rpout, incdir)
  File /var/lib/python-support/python2.6/rdiff_backup/backup.py,
line 51, in Mirror_and_increment
DestS.patch_and_increment(dest_rpath, source_diffiter, inc_rpath)
  File /var/lib/python-support/python2.6/rdiff_backup/backup.py,
line 243, in patch_and_increment
ITR(diff.index, diff)
  File /var/lib/python-support/python2.6/rdiff_backup/rorpiter.py,
line 280, in __call__
if last_branch.can_fast_process(*args):
  File /var/lib/python-support/python2.6/rdiff_backup/backup.py,
line 520, in can_fast_process
mirror_rorp = self.CCPP.get_mirror_rorp(index)
  File /var/lib/python-support/python2.6/rdiff_backup/backup.py,
line 471, in get_mirror_rorp
except KeyError: return self.get_parent_rorps(index)[1]
  File /var/lib/python-support/python2.6/rdiff_backup/backup.py,
line 453, in get_parent_rorps
raise KeyError(index)
KeyError: ('tmp', 'passenger.12237')
Fatal Error: Lost connection to the remote system


___
rdiff-backup-users mailing list at rdiff-backup-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki