How to Create a Bootable Backup of Mac OS X (Cloning Mac OS X disks)
* Pre-flight checklist
Make sure the "Ignore privileges on this volume" setting is not checked for your source or target volume (Note: this setting is called "Ignore ownership on this volume" in Jaguar). To check this setting, click on the target volume, choose "Show Info" or "Get Info" from the File menu in the Finder and select the Privileges menu (Jaguar: click the disclosure triangle next to ownership and permissions). Make sure the box at the bottom is NOT checked, otherwise permissions and ownership settings will not be preserved, no matter what tool you use to copy files.
Run Disk Utility on the target and source volumes before cloning. This is not required, but is a good idea to avoid disk or directory-related problems during cloning. If you are cloning an operating system with ditto or asr, I recommend that you erase the drive with Disk Utility prior to cloning. * Cloning a disk or backing up your drive with ditto, rsync, hdiutil and asr:
Ditto is a command-line utility that ships with Mac OS X. Ditto preserves permissions when run as root and preserves resource forks by default. Ditto can be used to clone your system with the following step:
sudo ditto -X / /Volumes/Backup
rsync can be used to make a bootable clone as well. In addition to basic file copying, rsync also offers the ability to synchronize the source and target volumes -- it can copy only the items that have changed, thus subsequent clones, or backups, are much faster. The syntax is pretty easy:
sudo rsync -xrlptgoEv --progress --delete / /Volumes/Backup
That will backup your entire drive, deleting anything from the target that is not on the source drive (synchronizing, that is). Rsync also preserves resource forks (that's what the "E" argument is for) and will give you a bootable backup just as well as ditto. Learn more about using rsync to regularly backup your drive to a remote machine.
While it doesn't give you a bootable clone, backing up to a disk image does offer flexibility in the location of your backup as well as backup portability -- your entire volume is located in a single file. Restoring from disk images is pretty easy as well, just mount the disk image and treat it like any other volume. Backing up a volume to a disk image (UDZO means a compressed disk image in this case) is simply done with this one command:
sudo hdiutil create /Volumes/Backup/mikes_laptop.dmg -format UDZO -nocrossdev -srcdir /
Finally, the ideal tool to use for creating bootable clones of your volumes is Apple Software Restore. Apple Software Restore, or asr, is also a command-line tool built-in to Mac OS X. While asr essentially functions like ditto in its file-copy mode, it also has the ability to clone a volume at the block level, preserving every last bit of data on the volume.
asr syntax for volume cloning is also pretty easy:
sudo asr -source / -target /Volumes/Backup -erase -noprompt
The "-erase" argument is optional, though recommended when cloning an operating system. Merged OSes are not usually very happy. To use asr in block-copy mode, you must be able to unmount both the source and target. That is, you can't block-copy your boot volume.
more here: https://static.afp548.com/mactips/image.html














