Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Apple > Operating Systems

  • Print
  • + Share This
This chapter is from the book

This chapter is from the book

Backing Up and Restoring Mac OS X Volumes

Here's some advice you should already know: Back up the files on your drive(s)—and do so often! If a file on your drive gets corrupted or accidentally deleted and you don't have a backup, you may not be able to retrieve it. When this happens, you'll be glad you had a backup.

The danger posed by a lost or corrupted file may not seem serious if the file in question is a freeware program you downloaded from the Web. In that case, you can just download it again. Even here, though, if a problem destroyed a folder containing hundreds of such programs, it would be a real pain to remember everything you lost and then reacquire all of the software. More serious is the loss of irreplaceable files such as the near-final draft of a novel you spent the last two years writing.

To prevent such disasters, it's usually sufficient to back up just the files you've acquired, and, especially, the documents you've created. For these purposes, you don't need to back up your entire drive but instead can restrict your backup to your home directory.

If you've installed applications in the Applications folder or added fonts to the /Library/Fonts folder, you may also want to back them up—especially if the software didn't come on a CD that could serve as a backup. But remember: Reinstalling applications from their installers is often better than just saving a backup of the application itself because an installer utility will install any accessory files (including invisible files), which you would not save by backing up just the application.

Note: If you've been using Classic, you may also want to back up your Mac OS 9 folders—System Folder, Applications (Mac OS 9), and (especially) Documents—to save any critical files and simplify a restore later.

There is, however, a good reason for maintaining a complete backup of your entire drive: If it becomes damaged in such a way that you need to either erase and reformat it or get a new drive, the simplest and fastest way to get up and running again is to restore the drive in its entirety from a current backup.

That being said, restoring a Mac OS X startup volume presents some unique obstacles, the most critical of which is making sure your backup and restored volumes are bootable. Unlike what you can do with Mac OS 9 volumes, you can't create a bootable copy of a volume via drag and drop in the Finder. If you try to do so, the following problems occur that prevent the copy from booting (or even from being a complete copy!):

  • File permissions are not preserved correctly.
  • Invisible files, especially the critical Unix software, are not copied.
  • Unix symbolic and hard links are broken.
03fig21.jpg

Figure 3.21 Left, Apple's .Mac's Backup utility; right, the Sync options from the .Mac System Preferences pane.

Backing up Mac OS X: Utilities for volume backups

Fortunately, the problems with backing up and restoring a Mac OS volume can be easily solved with a number of readily available utilities. These are especially good at creating a full, bootable "clone" of your startup volume.

Third-party backup utilities

Although you can back up and restore volumes using just the software that came with your Mac, the best, most reliable methods employ third-party software. Thus, I'll begin my discussion with these.

  • Prosoft's Data Backup has an exceptionally clear interface that allows you to choose different types of backups, such as the following:Clone. Creates an exact duplicate of the drive—the best option if you want a complete, bootable copy of the drive. Older files present on the backup but no longer present on the main drive will be deleted from the backup.Incremental. Adds new files to the backup but does not delete old ones—best if you want to keep old versions of documents and applications as an archive.Synchronize. Ensures that two folders or volumes are "in sync," copying in both directions, always preserving the newer version of a file. Note that if you delete a file from your main drive, it will also be deleted from the "synchronized" volume; similarly, if you delete a file from the backup, it will be deleted from the main drive. A variation of this approach, a unidirectional synchronization, is essentially the same as a clone (or mirror).
  • EMC Dantz's Retrospect for Mac OS X is the Mac OS X version of the gold standard of Mac OS 9 backup utilities. It includes numerous features that other backup utilities do not; however, one consequence of being more powerful is that it is also not quite as easy to use. One especially nice feature: It allows you to restore files while you're booted from the Mac OS X volume that's the intended destination.
  • Carbon Copy Cloner is a shareware utility that uses Unix's ditto command to make backups. The author's Web page (www.bombich.com/mactips/image.html) provides many more details about backing up Mac OS X volumes via Unix.
  • SuperDuper! is another excellent shareware utility. It features a unique safety clone feature that allows you update to a new version of Mac OS X while keeping the ability to quickly revert back to the prior version, should you need to do so.

Disk Utility

If you want to make a full backup of a volume using just Mac OS X utility software, use Disk Utility's Image and Restore features, which provide you with two options: You can back up and restore a volume directly, or you can create an image file for backup and restoring.

To back up and restore a volume directly:

  1. Launch Disk Utility, and in the window that appears, click any volume from the list at the left, and then click the Restore tab.
  2. From the list in the left column, drag the volume you wish to back up to the Source text box. Although your currently active startup volume can be used as the source, I would advise against it (that is, you should start up from another volume instead). For example, the active startup volume may impose permissions restrictions that prevent a successful complete backup.
  3. From the list in the left column, drag the volume you wish to contain the backup to the Destination text box. Note: Make sure the Ignore Ownership on This Volume option is not selected in the Finder's Get Info window for the Destination volume.
  4. Check the Erase Destination box. If you do not select Erase Destination, the restore will add to the existing contents of the Destination volume rather than replace it—typically not what you would want.
  5. Click the Restore button at the bottom of the window. If you have permissions problems when creating a backup (for example, you get a "Permission denied" error or other problem), log out and log in as the root user (or simply launch Disk Utility as root, using a utility such as Pseudo, as described in Chapter 4), and then try the above again.

Assuming that both volumes you selected were hard-drive volumes, this should back up the source volume to the destination volume.

If the source volume was bootable (for example, it was a volume from which you could start up in Mac OS X), the backup should be bootable as well (see Chapter 5 if you're having problems booting).

To restore from the backup you created, reverse the above procedure—that is, start up from the backup copy you made and restore to your original volume location.

To back up to and restore from a disk image:

  1. Launch Disk Utility, and from the list in the left column select the volume you wish to back up.
  2. From the File menu choose New, and from the submenu select Disk Image from {name of selected device}. The name of your selected volume should appear as the device name; however, it may appear as something like "disk0s3 (volumename)."
  3. In the Convert Image window that appears, do the following:
    1. Enter a name for the image.
    2. Choose an Image Format. "Read-only" is the best choice overall; however, you should choose "compressed" if you need to create a smaller image so that it will fit on the destination volume.
    3. Leave Encryption set to None (unless security of the image is a concern).
    4. Select a destination volume via the Where pop-up menu (or navigate to the desired destination location if you've expanded the dialog to view the file browser). This volume must be large enough to contain the image (plus temporary storage that may be needed while creating the image, which means the volume should have at least twice as much free space as the image itself will need).
  4. Click Save and wait for the image to be saved. If you run into permissions problems when attempting to create the image (for example, you get a "Permission denied" error or other problem), log out and log in as the root user (or simply launch Disk Utility as root, using a utility such as Pseudo, as described in Chapter 4). Try the above again.
  5. From the Images menu, select Scan Image for Restore. In the window that appears, select the image you just created and click Open. This verifies that an image can be used for restoring. The image is now saved and ready to be restored.

If desired, you can burn the image contents to a CD or DVD (assuming they fit) by selecting the image and clicking the Burn icon in the toolbar. This copies the "mounted" contents of the image to the CD or DVD, not the actual .dmg file itself. You can also copy just the .dmg file without using Disk Utility: Drag the .dmg file's icon to a mounted, unused CD-R or DVD-R in the Finder and burn the disc.

To restore from the image file:

  1. Launch Disk Utility, and in the window that appears, click the Restore tab.
  2. If the image you created is in the left column, drag it to the Source text box. If not, click the Image button, and then locate and select the image.
  3. Drag the name of the volume to be restored from the left column to the Destination text box. Keep in mind that this cannot be the current startup volume, because if it is, the destination volume will be erased.
  4. Check the Erase Destination box.
  5. Click the Restore button at the bottom of the window.

The volume should now be restored. Wait until restoration is complete; then restart from the restored volume.

03fig22.jpg

Figure 3.22 Disk Utility's Restore pane.

03fig23.jpg

Figure 3.23 Left, Disk Utility's File > New submenu; center, Images menu; and right, New Blank Image dialog (accessed through File > New > Blank Disk Image).

Using Terminal

If you're comfortable with using Terminal, you can back up a volume with Unix commands. The following provides an overview of what you need to know:

  • ditto. The ditto -rsrc command copies directories (and their contents), correctly maintaining all permissions settings and copying any resource forks. As a result, ditto is a good choice for making a clone backup of an entire volume—one that will be bootable, if necessary. In fact, Carbon Copy Cloner is a front end for the ditto command, bypassing the need to use this command in Terminal.Note: Make sure you are using a version of Carbon Copy Cloner that has been updated to work with Tiger. This applies to any third-party backup utility.
  • rsync. The rsync command acts as a directory synchronization tool. Compared with ditto, rsync adds the option to copy only files that are new or that have changed from an existing backup, thereby reducing the time needed to complete the task. Its disadvantage is that, like cp, it does not preserve the resource fork. The solution here is a variation on rsync that copies resource forks: RsyncX, from MacEnterprise.org (www.macosxlabs.org/rsyncx/rsyncx.html).
  • asr. As noted in "Technically Speaking: More About Disk Utility's Image and Restore Features," the asr command may be used to "clone volumes" (that is, make full bootable backup copies). You can use it instead of Disk Utility's Restore feature.

Backing up Mac OS X: Hardware strategies

Over time, the preferred backup hardware has changed, just as the common backup media has shifted (for example, from floppy disks to DVDs) and typical hard-drive capacity has increased (for example, from 20 MB to 100 GB and more). Backup hardware also varies as a function of the type of data you're backing up (a few files versus an entire disk).

Here are my current preferred backup choices. (You may find that using a combination of them provides the best option of all!)

  • CD-RW or DVD-RW drive. You use a CD-RW or DVD-RW drive to back up data to CD-Rs or DVD-Rs—primarily for a limited subset of your data (in particular, data that doesn't change often or that you would not be able to replace). In general, you can use the Finder to perform these types of backups. This method is perfect, for example, for backing up your MP3 music library, your collection of family digital photos, or the manuscript of that novel you're working on. It provides the most reliable way to store these files without risk of the backup itself becoming damaged or inaccessible. You can use this method (especially DVD-R) to back up an entire drive, though you won't want to do so often because it's likely to be very slow. You can also use RW discs in order to perform later backups with the same media; however, I recommend against this because writing to these discs is significantly slower than to the write-once media, and the discs are also more prone to becoming unreadable at some later point.If you're using CD-Rs (or similar media of limited size) and are unable to fit the entire contents of a directory onto one disc, you can divide the contents across as many discs as needed. Your only problem would be if you had a single file too large to fit on one disc. In that case, you might want to use a utility like StuffIt Deluxe, which can create a segmented archive of the file; each segment can then be stored on separate media. Apple's Backup application can also back up across multiple CDs. Additionally, you can create a segmented set of .dmg files (as noted in "Technically Speaking: More About Disk Utility's Image and Restore Features," above). However, I recommend using media that can contain the entire file or volume (if possible): It's much faster and less tedious.
  • Tape drive. A tape drive used to be a great choice for maintaining a regularly updated backup of an entire volume. However, with FireWire drives adding greater capacity for less money every year, it is often more economical (and certainly faster) to back up to another hard drive. Still, if you have a large amount of data that you want to archive and store, tape can be the preferred choice.With a tape drive and Retrospect, it's also easy to perform incremental backups. That is, you can instruct Retrospect to only back up files that have changed since the last time you backed up (saving time over a complete backup), and you can have it so that Retrospect does not overwrite old versions of files when adding new ones. This latter option is especially useful for frequently changing files: If you discover that an old "deleted" version of a document contains a passage you want to retrieve, you may still be able to recover that particular version of the document.
  • Hard drive: Individual file backup. If you've got an external hard drive—for example, one that connects via FireWire or USB—you can use it to quickly and easily back up individual files and folders. You simply connect it to your computer, drag the files and folders you want to back up, and then disconnect it.
  • Hard drive: Full backup. You can also do a full "mirrored" backup of a volume to another hard drive. This is especially useful if all you want to do is back up the internal drive in a single Mac. You can use Retrospect for this task (in exactly the same way that I described for tape drives); however, Retrospect includes another option, called Duplicate, that I recommend instead. Here's what to do:
    1. Get an external FireWire drive equal to or larger in size than your internal drive.
    2. Format it with the same number and sizes of partitions as your internal drive.
    3. Use Retrospect's Duplicate option to create a duplicate of the drive. (You will have to do this separately for each partition.)

    With this method, instead of storing your data in a Retrospect archival file format, Retrospect creates a duplicate of each file, much as the Finder would do. Unlike the Finder, however, Retrospect copies all files (including invisible files) and maintains all permissions and links correctly. The result is an exact duplicate of your hard drive. You can even boot from it.

    Do this backup as often as you feel necessary.

    With Retrospect and a hard drive (or multiple hard drives), you can do regularly scheduled incremental backups—great for users who need to back up an entire volume every day, or even every few hours.

    You can also use the previously mentioned utilities (such as Data Backup X and Carbon Copy Cloner) to do a mirrored backup of a hard drive.

  • Internet. You can back up to a server on the Internet. Apple's .Mac, especially in combination with its Backup utility, is the best-known example of this for Mac users. Although it is slow (and potentially expensive for large backups), it has the advantage of being off-site. If disaster strikes (such as a theft or fire in your home), these Internet backups will still be available. Unless you maintain physical backups somewhere else (such as by placing backup CDs in a safety deposit box or storing them at a friend's or relative's home), this is the only protection you will have against such disasters.

See also the following Web pages for more background on the Unix backup commands: "How to Create a Bootable Backup of Mac OS X (Cloning Mac OS X discs)" (www.bombich.com/mactips/image.html) and "Learning the Mac OS X Terminal, Part 5" (www.macdevcenter.com/pub/a/mac/2002/07/02/terminal_5.html).

  • + Share This
  • 🔖 Save To Your Account

Peachpit Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from Peachpit and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about Peachpit products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites; develop new products and services; conduct educational research; and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email ask@peachpit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by Adobe Press. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.peachpit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020