How To
Time Travel: Introduction to Time Machine
My first computer was an Apple IIGS purchased in the late 1980s. Two decades and several systems later, I’ve lost data numerous times to power failure, hard drive failures, and, yes, sometimes to operator errors. Experiences like that have made me realize the need for an effective backup strategy. I’ve even written about cloning your Mac as a means of recovering quickly from disasters. Even though I’m aware of the need for frequent backups, I don’t always practice what I preach. Like most users, I can always find more interesting things to do with the Mac than back up my data.
I’m sure Apple has been aware of folks like me for a long time. So much so that with the advent of Leopard they introduced a backup utility called Time Machine. Their goal was to create a program that made backing up and restoring your data an intuitive, seamless process. If you think backing up your data regularly is too time consuming or confusing, this program is aimed squarely at you and your unprotected data. So, let’s take a look at Time Machine’s capabilities and see if it meets your needs.
What Time Machine Does
Time Machine is a very basic program at heart. In essence, it copies files from your system to the backup destination of your choosing. Once the program is properly configured and the initial backup is complete, updates occur once every hour that the system is on. As long as the chosen destination is available, updates occur in the background without user intervention. On modern systems you probably won’t even notice that a backup is taking place. It’s a bit like having a personal assistant writing down everything that has happened to your system in the last hour.
How It Works
If that’s all there were to Time Machine, I probably wouldn’t find it very interesting. After all, at this level it’s essentially performing hourly, incremental backups throughout the day. The ingenious trick is using the hourly backups as the basis for a file archive. At the end of a day, hourly backups are combined into a daily backup. Let’s suppose I accidentally delete an important paragraph from this article just before the backup is executed. Later, when I realize the mistake, I can revert to a version…which still contains that brilliant missive.
Time Machine’s hourly backups are kept for 24 hours before it starts deleting older versions to save space. The first backup of the day is generally kept for an entire month. The first backup of the week is kept until your chosen backup location is almost full. In a further attempt to save space, Time Machine makes use of “hard links.” Rather than repeatedly copying files that haven’t been modified, Time Machine uses a “hard link” to point back to the original copy of a file (or folder). A new copy of a file is only written when that file is modified.
What Time Machine Does Not Do
Perhaps as a concession to simplicity and ease of use, Time Machine has a few limitations. There are some things it was never designed to do, and these limitations must be considered if it is to be used effectively. Some of these limitations can be addressed with a little thoughtful preparation, but other issues must be addressed with additional software. The most important of these limitations include:
Backups Are Not Bootable
By default, Time Machine copies all of the files on a source disk except for some temporary files which are not needed to boot the system. However, in the event of a disaster, you cannot boot directly from a Time Machine backup, even if that backup includes all system files. There are solutions to this problem, but we’ll address those in a moment.
Backups Are Not Compressed
Despite its space saving efforts, Time Machine backups can consume a significant amount of disk space because the backups are not compressed. This is something of a trade-off where transparent operation wins out over disk space considerations.
Backups Are Not Secure
Time Machine does not encrypt your backups, nor does it play nice with File Vault. Individual files, or groups of files, are only encrypted if they were saved/created with encryption. The backups as a whole are not encrypted. User folders protected by FileVault do not get backed up until the user logs out of that account. If your user folder is protected by FileVault, the only way to recover single files is to mount the disk image and copy the needed files using the Finder.
Limited Control Over Backups
“Out of the box,” Time Machine backups occur hourly. Adjusting that schedule requires some Terminal geekery or third-party software. Time Machine also presents limited options for excluding files from backup. It’s easy to exclude individual files or folders from backup but impossible to exclude files based on a pattern.
• • •
There are other limitations to Time Machine backups. These are the issues that stood out in my mind as important. Some have relatively easy solutions while others do not. If you’ve decided that Time Machine meets your needs, let’s dive right in.
Setting Up Your First Time Machine Backup
One of the first decisions you will have to make when setting up a Time Machine backup is where to place the files. Time Machine will back up to almost anything except optical drives, iPods or iDisks, and hard drives connected to AirPort Extreme Base Stations. External hard drives, Time Capsules, even network shares are all fine as far as Time Machine is concerned. Whatever your chosen destination, make sure it has plenty of space and is formatted as HFS+ with journaling enabled. You can also watch a visual guide to the setup process.
Although Time Machine can share space on the same drive with other files if you like, it won’t let you place a backup on the same drive partition that your Mac boots from. If your boot drive has a second partition, Time Machine can make use of that space, but I don’t recommend it. Any failure of the drive could not only compromise your ability to boot the Mac, but also your ability to restore files from your backup.
Now that you’ve got that hard drive connected, launch Time Machine via the Time Machine application or via the Time Machine preference pane. In a moment you are presented with the main Time Machine screen.
Click the “Choose Backup Disk” option. This brings up a sheet that allows selection of the desired backup drive. All storage devices attached to your Mac are listed here. If a drive is not properly formatted for Time Machine’s use, the message “Reformat Required” appears beside that device. Choose a location, then choose “Use for Backup.”
Once a useable destination is selected, Time Machine takes you back to the original configuration screen. Notice that the right side of the screen now shows the name of the device, the available space, the date of the oldest backup, and the date of the latest backup. The time before the next backup is also shown here. There’s also an option to put a Time Machine status indicator in the menu bar. With this indicator, you have an easy means of forcing an immediate backup, launching Time Machine, or opening Time Machine’s preferences.
Putting Time Machine on a Diet
Now that we are back to the main screen, our configuration of Time Machine is almost complete. Remember when I said that by default Time Machine backs up the entire source drive? If that’s what you want to do, your configuration is essentially done. If, on the other hand, you’d like a little control over the size of your Time Machine backup, now is the time to address that problem. Controlling the size of a backup is a little bit like trying not to gain weight. It’s much easier to keep the extra weight off in the first place than to take it off later. Although you cannot exclude files from a backup based upon rules, it is possible to exclude files and folders.
Now that you’ve designated a backup disk, you should be back to the Time Machine preference pane. Click the “Options” button to bring up a file selection sheet. Click the “+” sign to select a file or folder to be excluded. Continue doing this until all unneeded files are excluded.
Since I tend to keep a reasonably current system clone around to boot from in an emergency, I didn’t worry about having Time Machine back up system files. I also excluded the Applications and Developer Tools. Keeping a current clone means I didn’t really need another copy of the Applications folder and the Developer folder, which includes roughly 3 GB of files that are not updated often. Following these steps, my current Time Machine backup currently extends two months into the past and takes up just under 84 GB of drive space.
Other types of files can also cause the size of a Time Machine backup to explode. The Entourage e-mail database and disk images used by virtualization software are good examples. Not only are these often large files, in some cases several gigabytes of data, but changes are made almost every time these programs are used, necessitating a backup of the file rather than creation of another hard link.
Overcoming Limitations—The Bootable Backup
I must admit to being a little disappointed to discover that Time Machine backups were not bootable. This creates a situation that limits Time Machine’s usefulness. As long as your boot drive is OK, restoring from a backup is easy: launch Time Machine and locate the file that you want to recover, select the file, then click the “Restore” button.
If your boot drive has had a meltdown, though, this slows down the recovery process. In that case, Apple seems to expect you to boot from the OS X install DVD to perform the restoration, which can be quite time consuming. The solution is to make sure your designated backup drive is bootable.
If you are starting with a fresh drive, try installing and updating a copy of the OS before designating that drive as your Time Machine volume. In theory, other utilities could be added as well to create a “recovery drive” that has everything necessary either to get the existing boot drive hale and hearty or to move the data to a new drive via Time Machine. I’ve taken that one step further by keeping a current system clone on one partition of the drive that has my backup. In an emergency, I can boot from that drive and have ready access to the software I need as well as current data.
If you are using a drive that already has data on it, you can still create a bootable backup. This process involves using a cloning tool such as Carbon Copy Cloner to clone your install DVD onto the drive that contains your Time Machine backup. Set it to copy everything, and not erase the target volume. This provides all the benefits of booting from a DVD with the speed of a hard drive.
Overcoming Limitations—Creating Encrypted Backups
As far as I can determine, there isn’t an efficient way to create an encrypted backup of your data. About the best you can do at the moment is to encrypt files or folders and let Time Machine back up the resulting data. You cannot restore these files from directly within Time Machine. In a February 2008 article, Macworld concluded “…you can manually mount a Time Machine disk image and use the Finder to copy a single file if you wish.”
Overcoming Limitations—A Matter of Timing
By default, Time Machine backups occur hourly as long as the computer is on and the target device is available. That time frame suits my needs well, but what if you want to follow a different schedule? Apple doesn’t provide an option for setting the backup interval through the normal Time Machine interface. By now, you must know me well enough to know that I wouldn’t have broached the subject if I didn’t have a possible answer. If you like to use Terminal for such tasks, fire it up and enter the following command. Since you are using sudo, be prepared to enter an administrator password.
sudo defaults write /System/Library/LaunchDaemons/com.apple.backupd-auto StartInterval -int 1800
The number at the end of this command represents the time interval, in seconds, between backups. Executing the command as written above would change the interval between backups to 1800 seconds, or 30 minutes. Thanks to Cory Bohon at The Unofficial Apple Weblog for that tip. If you’re a bit leery of Terminal check out Time Machine Scheduler as one possible alternative. I haven’t tested it yet.
Overcoming Slow Backups on Wireless Networks
Let’s suppose you are backing up your favorite laptop via Time Machine and something like Apple’s Time Capsule. Some users have reported that the backup is incredibly slow. This is particularly true for the initial backup, when a large amount of data is being copied. For the initial backup, seriously consider using a wired connection. If updates over a wireless network are still slow, it may be due to a mixed wireless 802.11b/g/n network.
Restoring Files From a Backup
Restoration from a Time Machine backup is about as simple as these things get. Launch the Time Machine application. When the application opens, it consumes your entire screen with a time line on the right side of the screen. Restore and Cancel buttons dominate the bottom of the screen with a window representing the state of the drive in the center of the screen.
Restoring a file is simple. Click the time line on the right to get to the date you are interested in examining. Windows representing your drive will fly by until the correct one is reached. This is a cool effect that’s almost worth having to restore a file. Select the file you wish to restore in the window and click the Restore button. If you are not sure you have chosen the correct file, select one and tap the spacebar. Quick Look comes to the rescue, making it possible to preview the file before completing the restoration. Should you need to cancel a restoration, either choose Cancel or press Escape.
Final Thoughts
For a few months, I had an occasional error where Time Machine would inform me that a backup could not be completed. When the error occurred, the next backup usually completed without incident, regardless of whether it was initiated automatically or manually. I haven’t experienced this error recently, but I’m not sure if that is a function of recent system updates or my switch from the Mac Pro to the MacBook Pro as my main machine.
Time Machine has worked nicely for me during the last several months, partly because I’ve integrated it into a larger strategy that includes cloning my primary drive to get back up and running a bit quicker than if I needed to boot from the Leopard DVD for a restoration. For most users, Time Machine can be an effective component in a backup regimen that includes consideration for off-site backup and booting quickly in an emergency.
If you don’t have a current backup strategy, Time Machine may meet your needs. It can’t back up to optical media, and restoration requires either a little advance planning or a convenient bootable OS DVD. Available disk space may also be a concern, but Time Machine almost makes backup and restoration fun.
Also in This Series
- Give Alert Sounds a Little Personality · March 2012
- Create Your Own iPhone Ringtones · February 2012
- Create Your Own Homemade Audio Book · December 2011
- Upgrade to Lion Painlessly · August 2011
- Make the Most of TextEdit · July 2011
- Using the Free Disk Utility on Your Mac · May 2011
- Making Use of QuickTime X · March 2011
- Making the Most of What’s Already on Your Mac · February 2011
- Making the Most of What’s Already on Your Mac · January 2011
- Complete Archive
Reader Comments (15)
Apple replaced the drive under the AppleCare warranty and Time Machine restored the contents of the old drive without a hiccup.
While it's true one can not boot from a Time Machine backup, the step of starting from an OS X install disk and performing the restore from Time Machine was really not a hassle.
Using Ethernet for the initial backup saves time. However, wireless backups are quite stable and relatively quick on an all 802.11n Airport network.
After quite a bit of searching I discovered that for some users this has been happening since the 10.5.6 update. In my case the error may be tied to my deselecting the backup drive before taking the screenshots and attempting to reselecting it later. If you are experiencing this error and are comfortable with Terminal check out http://discussions.apple.com/thread.jspa?messageID=8668421 for a possible fix.
I had some difficulty getting the Terminal commands functioning properly so I took the following tack to solve the problem:
1. Write down the name of the file producing the error.
2. Use Tinker Tool or similar utility to make hidden files visible.
3. Select the problem file and do a Fit Info (command I)
4. Now the permissions on that file can be changed. I have given myself read/write access to that file but I am not sure this is correct. Everything does seem to be working fine for now though
The only other issue was that I had to use Time Machine Scheduler to get things back on the one hour schedule. Otherwise backups were being attempted about every 10-15 minutes.
Try this: open Mail (assuming you use Mail). Enter Time Machine. Now you'll see your Mail interface in 3-D Time Machine mode, where you can go back in time and find that brilliant satirical e-mail you sent to some political figure, but have since deleted.
My point is that most people don't think in terms of FILES, they think in terms of THINGS that a given application uses.
You may be right about the way people think of files. That might be especially good metaphor for filetypes that can be read by multiple applications (pdf, jpg, txt etc).
Some day I hope to be able to afford a Time Capsule, and I wonder: Is it possible to do wireless SuperDuper bootable backups to the WD drive by connecting it to the Time Capsule? (And is there any point... if you can do bootable backups wirelessly to the Time Capsule...can you?)
"In addition to the methods you mentioned for changing the backup interval for time machine, there is the freeware program Lingon, Lingon is useful for creating and modifying all sorts of daemons launched by launchd. Specifically, to change the time machine backup interval.
Launch Lingon
Click on the arrow beside System Daemons
select com.apple.backup-auto
Dismiss the warning
Change the time interval as desired and save
Another useful utility to use with Time Machine is Tri-Edre's Back-In-Time. This utility allows you to manipulate the time machine back up in a number of useful ways. Two in particular are noteworthy.
Back-In-Time allows access to time machine data for machines other than the one you happen to be using. This allows movement of files from machine to machine using the time machine data.
Back-In-Time works well with PathFinder. In particular you can restore files using Back-In-Time and PathFinder without launching Finder."
I was aware of Lingon but haven't tried it at this point. I wasn't aware of the other program.
Kelvin
It appears that the Directory Backup function in Tech Tool Pro can cause these huge backups. It is possible to still use that feature and prevent the huge Time Machine incremental backups. The comments for this hint tell you which folder to exclude from your Time Machine backups. One comment also explains why incremental backups often take longer the first time after a hard reset. http://www.macosxhints.com/article.php?story=20090708114919183
I usually use the Archive function in the Airport Utility to back up the Time Capsule to an external drive attached via USB. It's not automatic but the files on that drive do not get modified often. I think I will start looking for an automatic solution soon.