Apple oxs Server User Manual


 
52 Chapter 6 Working With Disks and Volumes
Imaging and Cloning Volumes Using ASR
You can use Apple Software Restore (ASR) to copy a disk image onto a volume or
prepare existing disk images with checksum information for faster copies. ASR can
perform file copies, in which individual files are restored to a volume unless an identical
file is already there, and block copies, which restore entire disk images. The asr utility
doesn’t create the disk images. You can use hdiutil to create disk images from
volumes or folders.
You must run ASR as the root user or with sudo root permissions. You cannot use ASR
on read/write disk images.
To image a boot volume:
1 Install and configure Mac OS X on the volume as you want it.
2 Restart from a different volume.
3 Make sure the volume you’re imaging has permissions enabled.
4 Use hditutil to make a read-write disk image of the volume.
5 Mount the disk image.
6 Remove cache files, host-specific preferences, and virtual memory files. You can find
example files to remove on the asr man page.
7 Unmount the volume and convert the read-write image to a read-only compressed
image.
hdiutil convert -format UDZO pathtoimage -o compressedimage
8 Prepare the image for duplication by adding checksum information:
sudo asr -imagescan compressedimage
To restore a volume from an image:
$ sudo asr -source compressedimage -target targetvolume -erase
See the asr man page for command syntax, limitations, and image preparation
instructions.
LL2354.book Page 52 Monday, October 20, 2003 9:47 AM