[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [rdiff-backup-users] Resource forks HFS+
From: |
Ben Escoto |
Subject: |
Re: [rdiff-backup-users] Resource forks HFS+ |
Date: |
Tue, 08 Jul 2003 11:04:02 -0700 |
>>>>> "DH" == Daniel Hazelbaker <address@hidden>
>>>>> wrote the following on Mon, 07 Jul 2003 14:37:43 -0700
DH> I am trying to figure out how to implement a new option to
DH> rdiff-backup. It would be useful for Mac OS X machines only
DH> running on HFS+ file systems. The option would be
DH> --use-resource-forks and would return the filename and the
DH> filename + "/rsrc".
If you want this feature to go into the main version, you may want to
look at the CVS version. In the fs_abilities.py file it tries to
autodetect various features of the file system, so extra options like
--use-resource-fork are unnecessary. Also it supports extended
attributes, which may be similar to resource forks.
DH> Reason: Mac OS X gives you access to the resource fork
DH> information by appending /rsrc to the filename. We want to
DH> backup a few hundred gigs of data, incrementally. These files
DH> have resource fork information that we would like to have backed
DH> up as well. The easiest way I can think to do this is with a
DH> modification to rdiff-backup that has it include the resource
DH> fork information. (When there is no resource fork information
DH> the "file" is 0 bytes long).
DH> Now. I am a fairly good programmer but I have VERY little
DH> experience with python. If I understand the code then I need to
DH> modify Iterate: and Iterate_fast: functions in selection.py.
DH> The Iterate function I think I understand but the Iterate_fast
DH> function is a bit confusing to me.
Iterate_fast should do exactly the same thing as Iterate. Profiling
said that Iterate was a bottleneck, so I rewrote it, but left the old
version there for documentation purposes (since Iterate_fast is hard
to understand, as you said).
Also one problem I see right away is that some of the code in
backup.py assumes that a file foo/bar won't be found unless foo is a
directory (check out PatchITRB.can_fast_process(..)). I don't have
much mac experience but it also seems that file foo/rsrc wouldn't be a
true file, so there would be problems changing it's permissions, etc.
It may be easier to assimilate the resource forks to extended
attributes. Can they also be accessed with
getxattr/setxattr/listxattr?
And just a warning about the CVS code: it is probably significantly
slower (at least when extended attributes are enabled) than 0.12.0,
and the EA stuff may unintentionally be linux specific, so parts may
not work on your system, even before you start messing with it.
--
Ben Escoto
pgpnOFuewAKjl.pgp
Description: PGP signature