rdff-backup / python linux fat32

Tim Gahnstrom it2gati at ituniv.se
Thu Jun 24 14:16:18 CEST 2004


rdiff-backup is aperently written in Python and when I run it in a 
special way I get some funy Python errors. Does anyone know if linux 
python have some issues with working with fat32 or usb drives? To 
tracebacks are provided below for more information.

This is the version information I get when I start Python ojn my Fedora 
Core 2 computer.

-bash-2.05b$ python
Python 2.3.3 (#1, May  7 2004, 10:31:40)
[GCC 3.3.3 20040412 (Red Hat Linux 3.3.3-7)] on linux2

The question, I think is is it worth the effort to try an upgrade of 
Python to 2.3.4 or a nightly build or something to get around the 
problem or is it some more general related to rdiff.

When I run the program normally I get this traceback,

-bash-2.05b$ rdiff-backup MyPhotos /mnt/usbdrive/test8
Traceback (most recent call last):
   File "/usr/bin/rdiff-backup", line 23, in ?
     rdiff_backup.Main.Main(sys.argv[1:])
   File "/usr/lib/python2.3/site-packages/rdiff_backup/Main.py", line 
250, in Main
     take_action(rps)
   File "/usr/lib/python2.3/site-packages/rdiff_backup/Main.py", line 
222, in take_action
     elif action == "backup": Backup(rps[0], rps[1])
   File "/usr/lib/python2.3/site-packages/rdiff_backup/Main.py", line 
260, in Backup
     backup_init_dirs(rpin, rpout)
   File "/usr/lib/python2.3/site-packages/rdiff_backup/Main.py", line 
318, in backup_init_dirs
     ErrorLog.open(Time.curtimestr, compress = Globals.compression)
   File "/usr/lib/python2.3/site-packages/rdiff_backup/log.py", line 
219, in open
     cls._log_fileobj = cls._log_inc_rp.open("wb", compress = compress)
   File "/usr/lib/python2.3/site-packages/rdiff_backup/rpath.py", line 
801, in open
     if compress: return gzip.GzipFile(self.path, mode)
   File "/usr/lib/python2.3/gzip.py", line 94, in __init__
     fileobj = self.myfileobj = __builtin__.open(filename, mode or 'rb')
IOError: invalid mode: wb


Without knowing the rdiff to well I could guess this is somehow related 
to the compressing of files on the fat drive or so so I try to invoke 
the program the no-compress option:Traceback (most recent call last):
   File "/usr/bin/rdiff-backup", line 23, in ?
     rdiff_backup.Main.Main(sys.argv[1:])
   File "/usr/lib/python2.3/site-packages/rdiff_backup/Main.py", line 
250, in Main
     take_action(rps)
   File "/usr/lib/python2.3/site-packages/rdiff_backup/Main.py", line 
222, in take_action
     elif action == "backup": Backup(rps[0], rps[1])
   File "/usr/lib/python2.3/site-packages/rdiff_backup/Main.py", line 
260, in Backup
     backup_init_dirs(rpin, rpout)
   File "/usr/lib/python2.3/site-packages/rdiff_backup/Main.py", line 
318, in backup_init_dirs
     ErrorLog.open(Time.curtimestr, compress = Globals.compression)
   File "/usr/lib/python2.3/site-packages/rdiff_backup/log.py", line 
219, in open
     cls._log_fileobj = cls._log_inc_rp.open("wb", compress = compress)
   File "/usr/lib/python2.3/site-packages/rdiff_backup/rpath.py", line 
801, in open
     if compress: return gzip.GzipFile(self.path, mode)
   File "/usr/lib/python2.3/gzip.py", line 94, in __init__
     fileobj = self.myfileobj = __builtin__.open(filename, mode or 'rb')
IOError: invalid mode: wb


This traceback is a little bit different but the error is still the same 
so maybe I was way of in my last guess. Anyone know if this is a known 
bug or have a workaround? I need to use fat32 on the drive because I 
need to be able to acces it from Windows also.

Tim



More information about the Python-list mailing list