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


Click here to return to the '10.6: Use Archive Utility to make zip backups' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.6: Use Archive Utility to make zip backups
Authored by: ojohns on Oct 07, '10 12:42:39PM

I just tested "ditto -ck --sequesterRsrc /Users/yourname/foo /Users/youruname/yourarchive/foo.zip" on a directory foo
containing files with both non-empty resource forks and metadata. Double-clicking on the resulting zip file in the
Finder does restore the original directory correctly. So, thanks for that comment.
(However, using the unix unzip in Terminal to unzip the zip file seems not to restore correctly. The __MACOSX directory
is kept separate. You have to restore using ditto, or the Finder, or Archive Utility directly.)

So, with ditto one can indeed make a shell script to do backups, or use Automator to make an
equivalent Services menu entry.

It looks like the Archive Utility might be a gui front-end for ditto, or maybe just reuses its code. I say that because,
in the Preferences for Archive Utility, the three choices for Use Archive Format (and their results) are:
compressed archive ---> cpgz archive
regular archive ---> cpio archive
Zip archive ---> zip archive
which are the same choices as those in ditto.

BTW, here's a quote from the zip man page in Snow Leopard 10.6.4, "Support for some Mac OS features in
the Unix Mac OS X port, such as resource forks, is expected in the next zip release." Maybe Apple has
abandoned upgrading the unix zip and unzip, and has moved on to use ditto instead?

---
ODJ



[ Reply to This | # ]