Backup Basics

There are a lot of bad things that can happen to your computer: hard drive problems, system crashes, theft, power surges, and physical damage are just a few of the kinds of things that can change your computer from a useful tool to a pile of plastic and silicon (or, in the case of theft, an empty space on your desk) in a matter of seconds. However, as bad as such events are, for many (if not most) people, the bigger loss is the actual data that was on the computer. After all, computers may be expensive to replace, but no amount of money can replace your data or the time and effort you spent creating it.

There's an old (but appropriate) saying in computers that goes something like this: "There are two kinds of people—those who have lost data, and those who will lose data." If you use computers long enough, you'll fall victim to an event like those described above. Or you'll find yourself a victim of your own missteps. (I'll admit to accidentally deleting a folder of documents that shouldn't have been deleted.) The only way you can prevent such an event from being truly disastrous is to back up your data. In fact, I'll put it bluntly—you can master every topic in this book, but if you're not backing up important data, you're not a "power user."

The subject of data backups is a complex one, and there are scores of ways in which you can go about backing up. There are also many different utilities available to help you. Although I could walk you through the steps needed to perform a certain type of backup, it may not be the best method for you. Because my space is limited, I'm instead going to talk about some of the basics of backing up, including general strategies and tips. If you're not schooled in the art of backups, the ideas discussed here should at least get you thinking about what you need to do to keep your data safe.

Finally, I'm also going to mention some of the tools that are out there to help you make backing up less of a hassle, and a couple of utilities that will allow you to synchronize volumes or directories. (Synchronization is technically a form of backup, but it's also a matter of convenience if you just want to keep the same data on two computers or volumes.)

Backups 101

Everyone's heard about the concept of "backing up data," but few people really take a step back and think about the process methodically. Here are some things to consider when deciding on a backup strategy.

How Much/What to Back Up

How much of your data you should back up depends on two things: which files are vital, and how much time you're willing to spend getting your computer back up and running. The first criterion is simple—if you need a document and it would be difficult, impossible, or impractical to recreate, make sure it gets backed up. This is a good argument for making sure that you at least back up your ~/Documents directory on a regular basis (and for making sure that you store your documents and personal files in that directory). If anything ever goes wrong, at the very least you'll still have your personal files, documents, e-mail, etc.

The second criterion, however, is one that many people never consider—in addition to losing documents, a computer disaster can result in the loss of applications, third-party system add-ons, preference files, browser bookmarks, and many other types of data that may not be "vital," but that nevertheless are important to your everyday work. If they don't get backed up and your hard drive dies, is stolen, or has to be rebuilt for any other reason, anything that wasn't backed up is going to have to be manually reinstalled (in the case of applications and system add-ons) and/or set up (application preferences, bookmarks, system settings, etc.). If you can't afford to spend the kind of time necessary to restore your computer to its "working" status from scratch, you should consider backing up more than just your Documents folder.

In my opinion, you should always make sure ~/Library is backed up in addition to your Documents folder, since your Library folder contains all of your personal settings and support files. For example, your Address Book database, iCal calendars, personal system addons, OS X Favorites, Keychain file, browser bookmarks, application settings, and possibly even your e-mail are stored in your personal Library folder. Backing up this folder will save you a lot of work if you ever have to start over.

Warning 

I mentioned in Chapter 5 that OS X uses invisible files quite frequently; unfortunately, these files do not get copied when your drag a folder between volumes, meaning that you can't simply back up your Library folder (or an entire OS X volume) using drag-and-drop in the Finder as you could in OS 9. You need to use a utility that is OS X-savvy (or Terminal's ditto -rsrc command).

Finally, if you want to be sure to get all of your personal data, including your iPhoto databases, iTunes music, the contents of your Desktop folder, your personal website files, etc., you need to back up your entire user folder. The only drawback is that photos and music take up a lot of space. But, again, it gets back to how much work you're willing to do to get back to your original state after a disaster. If you can't spare the hours it took you to rip your music from CD to MP3 for iTunes, you should back up your iTunes Music folder (inside ~/Music); likewise for your iPhoto database of photos (inside ~/Pictures).

Tip 

The discussion here makes a good argument for always storing important documents inside the folders you regularly back up. It also makes a good case for installing system add-ons at the user level, rather than the system level, since a good backup of user folders means you won't have to reinstall these add-ons in case you ever have to rebuild your hard drive.

If you're an admin user, you have a few additional things to consider. First, are you responsible for making sure other users' data is backed up? If so, you'll want to back up other user folders, as well. Second, do you have the time to manually reinstall every application? If not, consider backing up the Applications folder. Finally, do you have the time to manually reconfigure the entire system? In the worst case scenario, your computer will need to be set up from scratch, meaning you'll have to install OS X, create all user accounts, restore applications and user data, edit preferences and possibly configuration files, and so on. Personally, I don't have time for this, since my Mac is my livelihood, so I actually back up my entire system.

Tip 

Another benefit of having a complete system backup is that if your computer ever starts having serious problems, instead of spending time tracking down problems, you have the option of simply erasing the hard drive and restoring everything from the last "healthy" backup.

How Often to Back Up

The question of how much time you can afford to lose is also relevant when you're deciding how often to back up. To put it another way, in the event of a data disaster, you'll have to manually re-create any work you completed between the time of the disaster and the time of your last backup. If you only back up once a week, that means you could conceivably lose up to a week's worth of work. If you back up once a day, the most you could lose is a day's work. (If your work is especially important or time-sensitive, you can—and should—back up documents you're working on even more frequently.)

Local or Removable Backups?

How "safe" your backups are depends largely on where they reside. Here are a few examples, in increasing order of safety:

  • If you just want to make sure you have an extra copy of a document or documents in case you change your mind about edits or modifications you're making, simply making copies on your hard drive is sufficient. However, this is more of a "convenience" backup than a true backup procedure, since it won't help you if your hard drive dies—you'll lose all of your copies with the originals.

  • If you have a second internal hard drive, you can copy or (using a backup utility like those mentioned later in the chapter) archive files to the extra hard drive. This provides a convenient and fairly reliable backup, since the second drive should still work fine even if your primary hard drive dies. However, such a backup won't do you much good in the event of theft or disaster (such as a fire or severe power surge), since the second hard drive will fall victim to the same fate as the primary drive.

    Warning 

    Disk partitions that reside on the same physical hard drive are not a good choice for backups, since a hard drive failure will generally render all partitions on that drive equally inoperable.

  • If you have some sort of removable or portable media, such as an external hard drive, CD-R or CD-RW, DVD-R, magneto-optical disk, tape drive, etc., you can use it for backing up data. The advantage here is that not only is your data stored on a different storage device than your internal hard drive, but the backup is also removable/portable, so it can be stored separately from your computer. If your backups are kept at a different location than your computer, your data is still safe in case of theft or disaster.

Tip 

If your main reason for backing up files isn't necessarily safety from theft or disaster, but rather to have an immediately accessible copy of all data in case of drive failure, you can use two identically sized hard drives to create what is known as a mirrored RAID. When you have such a setup, all data is written to both drives at all times, so you always have two copies of every piece of data. I don't have the space to go into detail about RAIDs, but you can use Disk Utility to create them.

Businesses that rely on data often take these measures to the extreme. For example, many businesses use a system of on-site/off-site rotating backups. They continually back up data throughout the day, and at the end of each day they give their daily backup media to a data storage service that stores it in disaster-proof, secure data vaults. At the same time, the service returns a previous day's media to the company for use in the next round of backups. This setup ensures that the current day's data is immediately accessible, but data from previous days, weeks, or even years, is securely stored at a remote, secure location. This may sound extreme to the average home user, but if data is the heart of your business, such measures are standard practice.

What Kind of Media to Use for Backups

In addition to thinking about what to back up, and how often to do so, you should also consider what kind of media to use. There are a few things to think about when considering backup media: reliability, cost, performance, capacity, reusability, and portability. Here are some of the most common types of media, and their performance on these criteria:

  • CD-R Extremely reliable, provided you use reliable blank media (some of the bargain brands are reported to degrade over time). Blank CDs are extremely cheap (100 for around $30 for name-brand media), and hold 650–700MB each. Data must be written using a CD-R drive, but can be retrieved using any CD-ROM drive. Unfortunately, discs cannot be reused and are easily damaged.

  • CD-RW Almost identical to CD-R discs, but can be erased and reused (but for a price—CD-RW discs are significantly more expensive than CD-R media). Require a CD-RW drive to write data, but data can be read from most CD-ROM drives.

  • DVD-R Similar to CD-R discs, but with a much larger capacity (>4GB per disc) and more expensive ($5–$10 per disc). Require a DVD-ROM drive to write and retrieve data.

  • Zip disk Although Zip disks are very popular, I don't recommend using them for backup purposes. As a floppy disk-based medium, they are not reliable enough, in my experience, to be used for data backup.

  • Magneto-optical disk Considered to be the most reliable backup media on the market, and a good compromise between the reliability of optical media and the speed of magnetic (hard drive) media. They are the most expensive media in terms of cost/capacity. Disks are small, reusable, and almost indestructible.

  • Magnetic tape The mainstay of large-capacity commercial backups because of its combination of reliability, small physical size, and cost per GB (when purchased in bulk, less than $10 for 40GB of storage). Tapes can be reused many times. The downside to tape is that restoring files is very slow, and most tape drives do not allow random access (i.e., you can't mount a tape and copy files; you have to use a backup utility to restore files). Subject to data loss from strong magnetic fields.

  • Hard drive Overall, less reliable than other media, but considering that you're storing a copy of data, rather than the only copy, generally reliable enough. Second only to tape in terms of capacity for the price. Drives of 80GB can be had for under $100, and $300 can get you 300+GB. Backing up and retrieving data is very fast. Can be erased and reused easily. Larger than other media, but in a portable enclosure, still "tote-able." Like tape, subject to data loss from strong magnetic fields.

  • Online/Network In addition to local, physical media, it's also possible to use an online or networked backup service. For example, Apple's .Mac service allows you to use its Backup application to back up files to your personal iDisk over the Internet. Another popular Mac-focused online backup service is BackJack (http://www.backjack.com/). The clear advantage to an online backup is that it is located off-site. The disadvantages are than you must be connected to the Internet to back up or restore; copying files is usually slower than with local media; and the amount of data you can back up is often limited. (.Mac's iDisks only store 100MB of data unless you pay to upgrade your storage.)

Backup Strategies

Unfortunately, the subject of backup strategies is a complex one that requires far more space than I have here; entire books have been written on the topic. If you're interested in more information on specific backup strategies, I recommend Adam Engst's series of articles for the TidBITS electronic newsletter at http://db.tidbits.com/getbits.acgi?tbser=1041. In addition, Apple's Knowledge Base contains an article that includes a number of strategies for backing up, as well as a useful section that outlines the steps to take if you ever need to restore user folders; you can read that article at http://docs.info.apple.com/article.html?artnum=106941.

In case you're curious about my personal backup strategy, keep in mind that as a writer, all my work is on my computer, and losing a week's worth of data could be disastrous. For example, it could mean losing an entire chapter of this book! So I practice "backup overkill"—I can't afford to lose even a day's work. Here are the parts of my backup strategy:

  • I have a second internal hard drive that I use to mirror my boot volume. Every morning at 2A.M., a shell script (created using Carbon Copy Cloner, which I'll talk about in the next section) runs that compares the contents of the backup drive with the boot volume; any new or modified files are copied to the backup drive, and any files deleted from the boot volume are also deleted from the backup. This means that the backup drive will always contain an exact copy of my entire boot volume as of 2 A.M.. If my boot volume has problems, I can quickly erase it and restore it from the backup (or, if I just need a copy of one or more files, I can simply copy them from the backup drive). If my boot volume fails completely, I can simply select the backup drive as my startup disk and keep working. The only thing I lose is any work I've done between the time of the problem and 2 A.M. earlier that day. (Which, I hope, is taken care of using the next item.)

  • I also have a small, external FireWire hard drive that is used for periodic backups through-out the day. I use Retrospect (a backup utility mentioned in the next section) to automatically back up my Documents and Desktop folders at 10 A.M., 1 A.M., 5 P.M., 9 P.M., and 1 A.M. every day. If anything happens, I lose a few hours of work, at most. This backup drive also comes with me whenever I leave home for more than the day.

  • I have a magneto-optical (MO) drive that I use for "permanent" off-site backups. Once every couple of weeks, I back up my Documents folder to MO disks, and then take those disks to a friend or relative's house for storage. (I sometimes also use CDs to burn copies of photos, older documents, and other files that I want to keep safe, and store those off-site.)

This strategy is both convenient and secure, as it lets me immediately get up and running in the event of a serious hard drive problem, but it also keeps a regular backup of the most important files that is stored off-site in case of a major disaster. It sounds like overkill, but keep in mind that for this book I tested literally hundreds of pieces of software—many of which altered the OS, and some of which were beta versions—so I was asking for trouble on a daily basis. On more than one occasion my Mac had serious problems due to my experimentation, yet I was never down for more than a couple of hours.

Backup Utilities

There are more backup-oriented utilities for OS X than you can shake a stick at—a search for "backup" on VersionTracker.com produces almost 60 results! In addition, you can use Terminal manually, or via a utility such as Carbon Copy Cloner, to copy or synchronize files from one volume to another.

I would love to walk you through some of my favorite backup and synchronization utilities— really, I would; there are so many cool backup utilities out there now that there's no excuse not to back up—but I'm running out of space in this chapter. Instead, I'm going to mention a few of the best; most have great documentation that, along with the general backup concepts I've covered, should get you up and running quickly. Most also offer additional features like scheduled backups (updating your backup with new and modified files according to a schedule), cloning (making an exact copy of a folder or volume that is usable in the Finder), and synchronization (a two-way procedure used to keep two folders or volumes up to date so that they each contain the newest version of every file).

Note 

Most backup utilities require administrator access, since they need to back up files regardless of the owner, and since they usually require a system-level startup item or access to the system's crontab to schedule automated backups.

In terms of traditional "backup" software—utilities that are intended to help you archive files for safekeeping, and restore them if needed at a later date—Dantz's Retrospect (http://www.dantz.com/products/mac.html, commercial) has long been the king, and for good reason. It's got more features and functionality than anything else on the market, making it the most powerful and flexible option available. Home users should consider the Express or Desktop versions, which offer more than enough features for most people. The main differences are that Desktop—which costs a bit more—adds the ability to back up to tape drives, to back up over a network, to watch for laptops and back them up when they connect to the network, and the ability to create custom file filters that control exactly what files are backed up (or not).

Although Retrospect is highly respected as a backup tool, the main criticism of it has been its user interface and learning curve. Because it has so many features and options, it can be a bit intimidating; in addition, the average user really doesn't need many of its more advanced features. As a result, a lot of alternatives to Retrospect have sprung up. Two of the best are Prosoft's Data Backup X (http://www.prosoftengineering.com/products/, commercial) and the shareware DéjàVu (http://propagandaprod.com/). Data Backup X actually has many (though not all) of the same features as Retrospect, but its interface is much more accessible for the average user. For example, you can execute an immediate backup, restore files from backup, copy/clone files or a volume, synchronize folders or volumes, or compress a folder or volume, all by simply clicking on a button in the main window (Figure 14.8). Data Backup X also has a convenient "compare folders" function that tells you the differences between the contents of any two folders. If you want to create a scheduled action, the various options are explained clearly so that you know exactly what your newly created schedule will do, and when. Data Backup X is fairly new to OS X, but it should give Retrospect a run for its money as one of the best full-featured backup utilities for home users.

click to expand
Figure 14.8: Data Backup X's main (left) and new scheduled action (right) windows

DéjàVu is much more limited than Retrospect or Data Backup X, but it's also incredibly easy to set up. It runs as a preference pane, and provides a simple list of folders to be backed up (Figure 14.9). You click the + button to add a new schedule, select how often you want it backed up (daily, weekly, or monthly), and then choose the folder to be backed up and the destination for the backup. The Options screen lets you specify the times and days/dates the backup should occur, and you can also choose to mirror the folder instead of archive it (mirroring means that if you delete a file or folder from the original folder, it will also be deleted from the backup). Finally, DéjàVu provides a convenient display of when the most recent daily, weekly, and monthly backups were executed, so you know exactly when your files were last backed up.

click to expand
Figure 14.9: DéjàVu's backup scheduler is simple to set up.

Tip 

If your main goal is to synchronize two folders or volumes so that they each contain the newest version of every file—for example, to keep your Documents folder on your laptop and your desktop Mac in sync—you may want to consider a dedicated synchronization utility. The shareware ExecutiveSync (http://www.executivesync.com/) and Chrono-Sync (http://econtechnologies.com/) are two of the best.

Finally, I mentioned that one of my "get back up and running fast" strategies is to keep an exact copy of my boot volume on a second hard drive, updated nightly. For this I use the excellent Carbon Copy Cloner (http://www.bombich.com/software/ccc.html). In Chapter 4 I showed you how to use Carbon Copy Cloner to "clone" a volume; it also offers the ability to mirror a drive and update that mirror on a regular schedule. In fact, it actually does this by creating a shell script and then using a system-level crontab entry to run it!

Note 

If you're a member of Apple's .Mac service, you can download a copy of Apple's own Backup utility. However, I personally find Backup to be extremely limited and don't recommend it. There are too many other inexpensive backup solutions available that are much more capable.




Mac OS X Power Tools
Mac OS X Power Tools
ISBN: 0782141927
EAN: 2147483647
Year: 2005
Pages: 152
Authors: Dan Frakes

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net