RobustErrorHandling

From RdiffBackupWiki

Jump to: navigation, search

The potential of rdiff-backup as an automatic backup engine is compromised by the fact that a backup failure may require manual intervention. For example, the "regressing destination" error ([1] question 15)should be resolved by the program, not the user.


Here is a specific case posted by krezreb on Jan 26th 2010 :

On Windows, encountered an error while copying long filenames to a network share :

 UpdateError path/to/tmp/file/rdiff-backup.tmp.11925 [Error 3] The system cannot find the path specified
 OSError while renaming \\share\path\rdiff-backup-test\ARP_Fusion/htdocs/arp-dev/fusion/ZIP/10_2008/rdiff-backup.tmp.12654 to \\fileserver\Arp Support\Backup\rdiff-backup-test\ARP_Fusion/htdocs/arp-dev/fusion/ZIP/10_2008/RE  On tosap319 eu airbus corp - SAPOPC  Number of ABAP 4 dumps since 10 03 2008 10 01 58 is 75  Configured threshold is  20 dumps in 1 hours (r3mondmp) (archived) (507).msg

This is a limitation of SMB as I could not even copy the file manually because of the length of the filename. However, this resulted in an exception and rdiff exited without printing the stats to the logfile.

 Exception 'local variable 'sd' referenced before assignment' raised of class '<type 'exceptions.UnboundLocalError'>':
 File "rdiff_backup\Main.pyc", line 306, in error_check_Main
 File "rdiff_backup\Main.pyc", line 326, in Main
 File "rdiff_backup\Main.pyc", line 282, in take_action
 File "rdiff_backup\Main.pyc", line 348, in Backup
 File "rdiff_backup\backup.pyc", line 38, in Mirror
 File "rdiff_backup\backup.pyc", line 240, in patch
 File "rdiff_backup\rorpiter.pyc", line 281, in __call__
 File "rdiff_backup\backup.pyc", line 533, in fast_process
 File "rdiff_backup\backup.pyc", line 563, in patch_to_temp
 File "rdiff_backup\rpath.pyc", line 192, in copy_attribs
 File "rdiff_backup\rpath.pyc", line 1406, in write_win_acl
 File "rdiff_backup\win_acls.pyc", line 240, in rpath_set_win_acl
 File "rdiff_backup\win_acls.pyc", line 169, in write_to_rp
 File "rdiff_backup\win_acls.pyc", line 103, in clear_rp

It would be nice if the app would catch the error, print it to STDERR, and continue to execute.

Personal tools