Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Secure backup (with resource forks) to Linux boxes' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Secure backup (with resource forks) to Linux boxes
Authored by: jms1 on May 01, '04 02:13:12AM
even better... if you're creating a new archive rather than updating an existing archive, you don't have to deal with samba or nfs at all.
sudo ditto -c -z --rsrc {source} - | ssh user@server 'cat > backup.cpio.gz'


[ Reply to This | # ]
Secure backup (with resource forks) to Linux boxes
Authored by: sjk on May 01, '04 04:24:02AM

Ahh, I had just considered posting a similar suggestion but hadn't figured out the details of how best to extract data. Using gzcat and cpio from the command line there's an issue with resources forks being restored with ._ prefixes that differ in size from the original resource fork, like:

% ls -l bin/buildDMG/..namedfork/rsrc testbin/._buildDMG
-rwxr-xr-x 1 me me 45607 29 Mar 11:48 bin/buildDMG/..namedfork/rsrc
-rwxr-xr-x 1 me me 45689 30 Apr 22:33 testbin/._buildDMG

Same result extracting files with unzip after using "ditto -k ..." to create a zip instead of a compressed cpio archive.

What accurately restored file forks was using ditto (of course) or opening the compressed zip file in Finder, causing BOMArchiveHelper to process it. However, that restores the entire archive and I was looking for ways to extract individual files.

Opening the compressed cpio archive in Finder generated some error about permissions, which might have been because some of the files were read- or execute-only even tho' I was the owner. No time to figure that out.

Also, the ditto man page recommends using a .cpgz extension for compressed cpio archives. This allows BOMArchiveHelper to process them in a single pass when double-clicked in Finder. Otherwise only the cpio file is uncompressed.

The bottom line is I'm not sure how to extract individual files with resource forks from ditto-created archives with complete integrity.

Whew, that adventure was more than I bargained for. :-)



[ Reply to This | # ]