[rdiff-backup-users] What happens if rdiff-backup crashes during a backu
From:
Vahid Pazirandeh
Subject:
[rdiff-backup-users] What happens if rdiff-backup crashes during a backup?
Date:
Mon, 25 Jun 2007 15:32:32 -0700
Hi All,
I love rdiff-backup. However, I don't like how fragile it is when it crashes during a backup. Let's say the client pushes some backup data to a remote server, but in the middle of a file transfer, the remote server's network goes out. The next time rdiff-backup is executed, it immediately gets an error (I've pasted it below). The error is due to some files in the remote rdiff-backup-data dir being corrupt / out of sync.
The FAQ says to manually clean up the dirty files: http://rdiff-backup.nongnu.org/FAQ.html#regress_failure This works, but I have two problems with it: it requires manual intervention; and I can't seem to clean my files without losing some backup data (maybe I'm just doing it wrong, since the FAQ claims it can be done without any data loss). Actually I have a third problem: it doesn't always work. I'm doing some crash tests and I'm having difficulty bringing my data back to life. =/
rsync handles this fine, since it doesn't have to deal with all these meta files. But it obviously doesn't have file revision history, which is a feature I'd like.
So, how does everyone deal with problems like this?
(please CC my gmail email address in your reply)
Here's the actual error I receive. This occurs every time rdiff-backup is run since the files in rdiff-backup-data (on the destination server) are corrupt. The most recent call is on the bottom:
------- snip snip ------
Exception '' raised of class '<type 'exceptions.AssertionError'>': File "/usr/local/lib/python2.5/site-packages/rdiff_backup/Main.py", line 299, in error_check_Main try: Main(arglist)
File "/usr/local/lib/python2.5/site-packages/rdiff_backup/Main.py", line 319, in Main take_action(rps) File "/usr/local/lib/python2.5/site-packages/rdiff_backup/Main.py", line 275, in take_action
elif action == "backup": Backup(rps[0], rps[1]) File "/usr/local/lib/python2.5/site-packages/rdiff_backup/Main.py", line 332, in Backup backup_final_init(rpout) File "/usr/local/lib/python2.5/site-packages/rdiff_backup/Main.py", line 432, in backup_final_init
checkdest_if_necessary(rpout) File "/usr/local/lib/python2.5/site-packages/rdiff_backup/Main.py", line 827, in checkdest_if_necessary need_check = checkdest_need_check(dest_rp) File "/usr/local/lib/python2.5/site-packages/rdiff_backup/Main.py", line 817, in checkdest_need_check
if not force: curmir_incs[0].conn.regress.check_pids(curmir_incs) File "/usr/local/lib/python2.5/site-packages/rdiff_backup/connection.py", line 448, in __call__ return apply(self.connection.reval
, (self.name,) + args) File "/usr/local/lib/python2.5/site-packages/rdiff_backup/connection.py", line 367, in reval for arg in args: self._put(arg, req_num) File "/usr/local/lib/python2.5/site-packages/rdiff_backup/connection.py", line 139, in _put
else: self._putobj(obj, req_num) File "/usr/local/lib/python2.5/site-packages/rdiff_backup/connection.py", line 144, in _putobj self._write("o", pickle.dumps(obj, 1), req_num) File "/usr/local/lib/python2.5/pickle.py", line 1366, in dumps
Pickler(file, protocol).dump(obj) File "/usr/local/lib/python2.5/pickle.py", line 224, in dump self.save(obj) File "/usr/local/lib/python2.5/pickle.py", line 286, in save f(self, obj) # Call unbound method with explicit self
File "/usr/local/lib/python2.5/pickle.py", line 600, in save_list self._batch_appends(iter(obj)) File "/usr/local/lib/python2.5/pickle.py", line 633, in _batch_appends save(x)
File "/usr/local/lib/python2.5/pickle.py", line 286, in save f(self, obj) # Call unbound method with explicit self File "/usr/local/lib/python2.5/pickle.py", line 723, in save_inst stuff = getstate()
File "/usr/local/lib/python2.5/site-packages/rdiff_backup/rpath.py", line 760, in __getstate__ assert self.conn is Globals.local_connection ------- snip snip ------