SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
switches for OS X
Author Message
Post switches for OS X 
I just heard about rdiff-backup, and am testing version 1.0.1 on OS X
10.4.2. It looks like rdiff-backup needs to be run with two switches
set (--no-carbonfile --override-chars-to-quote ''). What does the --
no-carbonfile switch do? What info is missing from my backup if I
use this switch?

If I don't use the --no-carbonfile switch, I get errors like:

Traceback (most recent call last):
File "/sw/bin/rdiff-backup", line 23, in ?
rdiff_backup.Main.Main(sys.argv[1:])
File "/sw/lib/python2.4/site-packages/rdiff_backup/Main.py", line
283, in Main
take_action(rps)
File "/sw/lib/python2.4/site-packages/rdiff_backup/Main.py", line
253, in take_action
elif action == "backup": Backup(rps[0], rps[1])
File "/sw/lib/python2.4/site-packages/rdiff_backup/Main.py", line
306, in Backup
backup.Mirror(rpin, rpout)
File "/sw/lib/python2.4/site-packages/rdiff_backup/backup.py",
line 38, in Mirror
DestS.patch(dest_rpath, source_diffiter)
File "/sw/lib/python2.4/site-packages/rdiff_backup/backup.py",
line 218, in patch
ITR(diff.index, diff)
File "/sw/lib/python2.4/site-packages/rdiff_backup/rorpiter.py",
line 285, in __call__
last_branch.fast_process(*args)
File "/sw/lib/python2.4/site-packages/rdiff_backup/backup.py",
line 477, in fast_process
if self.patch_to_temp(rp, diff_rorp, tf):
File "/sw/lib/python2.4/site-packages/rdiff_backup/backup.py",
line 504, in patch_to_temp
rpath.copy_attribs(diff_rorp, new)
File "/sw/lib/python2.4/site-packages/rdiff_backup/rpath.py", line
160, in copy_attribs
rpout.write_carbonfile(rpin.get_carbonfile())
File "/sw/lib/python2.4/site-packages/rdiff_backup/rpath.py", line
1158, in write_carbonfile
finderinfo.Creator = cfile['creator']
TypeError: unsubscriptable object
Exception exceptions.TypeError: "'NoneType' object is not callable"
in <bound method GzipFile.__del__ of <gzip open file '/Volumes/Ext_BU/
Users/kwh/rdiffbu/rdiff-backup-data/file_statistics.
2005-10-09T11:28:05-04:00.data.gz', mode 'wb' at 0x79a0b0 0x7a7c10>>
ignored
Exception exceptions.TypeError: "'NoneType' object is not callable"
in <bound method GzipFile.__del__ of <gzip open file '/Volumes/Ext_BU/
Users/kwh/rdiffbu/rdiff-backup-data/error_log.
2005-10-09T11:28:05-04:00.data.gz', mode 'wb' at 0x38a380 0x7a7b48>>
ignored
Exception exceptions.TypeError: "'NoneType' object is not callable"
in <bound method GzipFile.__del__ of <gzip open file '/Volumes/Ext_BU/
Users/kwh/rdiffbu/rdiff-backup-data/mirror_metadata.
2005-10-09T11:28:05-04:00.snapshot.gz', mode 'wb' at 0x79a0f8
0x7a7c38>> ignored

========
If I don't use the --override-chars-to-quote '' switch, the upper
case characters in paths are replaced by ;XXX constructs, where XXX
is the ASCII code for the character. This then leads to an error
with a too long file name. I can see why this behaviour is needed,
if backing up from other file systems to a Mac file system, due to
the case insensitivity of the later. But it shouldn't be needed if
backing up from a case insensitive file system.

It would be useful to add both the above switches to the
documentation, with a reference that they may be needed if backing up
from an HFS+ file system on OS X.

Kevin Horton
Ottawa, Canada

Post switches for OS X 
Kevin Horton <khorton01 < at > rogers.com>
wrote the following on Sun, 9 Oct 2005 13:45:13 -0400
I just heard about rdiff-backup, and am testing version 1.0.1 on OS X
10.4.2. It looks like rdiff-backup needs to be run with two switches
set (--no-carbonfile --override-chars-to-quote ''). What does the --
no-carbonfile switch do? What info is missing from my backup if I
use this switch?

Supposedly rdiff-backup backs up Mac OS X carbonfile information. I'm
not sure what this is, just that it seems to cause bugs :-)

Maybe someone who knows something about Mac OS could look at this code
snippet:

def get_carbonfile(self):
"""Return resource fork data, loading from filesystem if
necessary."""
from Carbon.File import FSSpec
import MacOS
try: return self.data['cfile']
except KeyError: pass

try:
fsobj = FSSpec(self.path)
finderinfo = fsobj.FSpGetFInfo()
cfile = {'creator': finderinfo.Creator,
'type': finderinfo.Type,
'location': finderinfo.Location,
'flags': finderinfo.Flags}
self.data['carbonfile'] = cfile
return cfile
except MacOS.Error:
self.data['carbonfile'] = None
return self.data['carbonfile']

What would cause a MacOS.Error? And does it happen just on certain
strange files, or all the time? Should I disable carbonfile support
by default, or is this an important feature?

If I don't use the --override-chars-to-quote '' switch, the upper
case characters in paths are replaced by ;XXX constructs, where XXX
is the ASCII code for the character. This then leads to an error
with a too long file name. I can see why this behaviour is needed,
if backing up from other file systems to a Mac file system, due to
the case insensitivity of the later. But it shouldn't be needed if
backing up from a case insensitive file system.

Well it's hard to determine if a file system is case sensitive unless
you can write to it (so right now the source isn't checked for case
sensitivity).

Maybe resource fork ability could be a good substitute for handling
the Mac OS case: if the source and destination both support resource
forks, then disable quoting?


--
Ben Escoto

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