MacOS X: Backup and Restore Entire Volume


/usr/bin/rsync that comes with Mac OS X v10.4 (Tiger) now supports resource fork operation with -E option. You should consider this an alternative to psync.


Until MacOS 9.x, MacOS is the easiest platform to do full volume backup. All you have to do is grab a media large enough and drag the target hard drive icon to destination drive. When you restore the volume,just select the destination drive via "Startup Disk".

That is no longer the truth with MacOS X. As hyped very loudly MacOS X is a "moisturized" BSD Unix which requires proper files located at proper path. Unlike MacOS 9 where the only folder required to boot a volume is "System Folder" which path can be anywhere in the volume, MacOS X requires such folders as /etc and /usr directly under the startup volume. To make matters further complicated, MacOS X Finder ("Aqua Finder" as follows) hides these critical folders, disabling attempts to restore volume within Aqua Finder.

Then how about good old Unix method? dump/restore? tar? dd? rsync? To a good old unix user, the command below appears to work;

cd /; tar -Xcf - . | (chdir /Volumes/dst && tar -xvpf -)

Sorry, it does not. MacOS X is too moisturized to apply straight unix methods. MacOS X appears to be dependent on HFS(+) file attributes which are rendered inaccessible from those conventional unix commands. So what you get is a volume stripped with all resource forks and finder attributes.

So what are you going to do? Here it is.

Single-command solution: psync

In hope to remedy this situation, I have written psync, a perl script that comes with MacOSX::File.

Due to its popularity it now has its own page.

Backup and restore via MacOS 9

This section is now in a separate document.


Q: Why can't you use Aqua Finder to backup?
A: Give it a try. You will find you can't copy files due to insufficient permission. We need Classic Finder to forciblly ignore permissons.
Q: MacOS 9.x ignores file permisson. Then why does the copy via Classic Finder works?
A: Because Classic Finder copies all HFS+ attributes, including such attributes as file permissions and ownershipsthat are not used by MacOS 9.x
Q: Can't you use CpMac utility for that purpose, say "cd /; CpMac -r Applications Library .. /Volumes/to_volume" ?
A: Sorry. While CpMac copies resource fork and other attributes, it resets file ownerships and modification dates. As a result, the system gets clobbered. Trust me, I've already done that.
Q: Is there any way to incrementally back up MacOS X volumes?
A: psync discussed above does just that!
Q: This is still too complicated to me! Easier solution, please!
A:See "Alternatives" below.


As Larry Wall says, there are more than one way to do it. Here is some.

History of this Document

psyncnow has its own page.
"Alternative" section completely revised.
Rewritten with stylesheet; Validated with W3C HTML Validator
Binary distribution of MacOSX::File introduced
Rewritten in great deal to introduce psync
More typos fixed (thank you, Struan Robertson, et al.).
Alternatives section added.
ditto-based solution is added.
Updated in response to feedbacks(Thank you, Gary L. Gray and others responded)
Introduced in "MacFixit: Troubleshooting for MacOS X"
Created & Uploaded