(originally published 2/5/2008)
Time Machine is a new concept in automated backups.
Documentation is
slow to come, but I have been able to find tidbits of
information on the web. Most
reviews have been positive.
Without getting too far into what a good
backup strategy should provide, a backup strategy should allow for the following:
- System-level backups (the entire system)
- File-level backups (individual files, viewable through the OS/in Finder)
- Application-level backups (items within an application, such as a photo in iPhoto, a contact in Address Book, an email in Mail)
Although Time Machine system-level backups are not bootable, Time Machine handles all 3 levels, and does it very well.
History (prior to OS/X Leopard)For system-level backups, OS X has had
disk cloning (also known as "bootable backups") for some time now.
Super Duper and
Carbon Copy Cloner were created to add a GUI to OS X disk cloning support.
In the Tiger days, Apple
recommended .mac or third-party tools for file-level backups, although the Unix utility rsync was available for advanced users.
Application-level backups were handled within each individual application, as long as the application included backup support. Even today, Time Machine application-level backups are only supported by a small number of apps.
Technical DetailsRsync uses a *nix
functionality called
Hard Links to make space-efficient backups. Multiple hard links to the same file or folder are also known as
multi-links. Apple had
"...designed the multi-links in HFS+ primarily to support Time Machine. Unlike other Unix or Linux distros, Mac OS X's multi-links support hard linking to both files and directories. Creating multiple hard links to directories is outlined in the official POSIX specification for Unix, but is rarely supported because the use of multiple hard links for directories is dangerously powerful. If a child directory linked to its own parent, it would create a directory cycle that could cause unbridled looping and file system corruption. File system utilities are also typically unprepared to handle multi-linked files. In Time Machine, multi-links are used in a specific, controlled context to avoid these types of problems. " Linux does have similar solutions to Time Machine, but do still not match the speed and space-saving features of OS X.
Large files, such as DMG files and VM images, are not handled well by Time Machine. Because Time Machine uses hard links in incremental backups, any change in the large file results in the entire file being copied over, not just the change itself. Leopard also introduced
sparse bundle disk images so that large files (such as regular sparse disk images) could work better with Time Machine. The
images are "mountable directories full of banded data in 8M chunks" to separate the physical disk image from the logical one. This is a step in the right direction, but still has a few
kinks to work-out. Some users have attempted to use
sparse bundles as a large file backup solution, but tests have mixed results.
Other than large files, Time Machine has had some
complaints, but are continuing to address those complaints with the latest OS X service packs. One of the problems involves not being able to backup
live File Vaults.
How it WorksTime Machine creates hourly, daily and weekly backups. As I mentioned in a separate
blog post, Time Machine is "self-maintaining". As the drive that holds your backups begins to run out of space, the oldest backups will be automatically deleted to make room for the newest backups. To put it simple, configure Time Machine, and let it go.
The Time Machine icon displays at the top of the screen and animates/turns during a backup. To force a backup, click the icon and select "Back Up Now" from the pop-up menu. Otherwise, automatic backups will occur.
The term "self-maintaining" may apply only to a certain point. Although I have not seen this issue myself,
some users have noted a "not enough space on hard drive" error message, but have been able to get past the error by expanding their backup storage or upgrading the backup hard drive.
Set-upBefore starting Time Machine, it is recommended to use a backup drive that has at least 2x the total storage being backed-up. A dedicated external drive or a
Time Capsule are recommended. Time Machine cannot
backup to flash drives.
Apple recommends Time Capsule as backup storage for Time Machine. Time Capsule will allow for
backups over a network. I personally use Time Capsule and have not noticed any issues after experiencing problems using a 1TB external Fantom drive enclosure. Storage on Time Capsule can be
expanded with an added USB external drive, and Drobo appears to be a
good expansion solution. For the more adventurous, unofficial directions note how to
replace the Time Capsule hard drive.
First of all, make sure the latest Time Machine updates are installed. Many of the problems referenced in this article by other users have been
fixed in the latest updates.
Configuration is VERY simple. Click the icon and select "Open Time Machine Preferences..." (you may also open the preferences by navigating through system preferences). "Change Disk" changes the backup
location. "Options..." will display a list of items that will not be backed-up. Time Machine can be turned on/off at any time by moving the big slide button.
For the
backup location, note that external drives will appear as separate backup shares; a backup cannot span multiple hard drives.
In the
Do not back up settings within "Options..." mentioned above,
external hard drives connected to the main computer are not backed-up by default. The drives can be removed from the list and will be backed-up by Time Machine, if necessary. Good candidates for the exclusion list would include large files that change frequently and temporary/working directories.
Restoring DataRestoring individual itemsTime Machine can restore file-level items just like any other backup tool. To do so, open Finder, then select "Enter Time Machine" from the
The Time Machine icon menu. Opening Finder is not required unless you are using one of the applications mentioned in the next paragraph. Finder will be surrounded by a space theme, including a timeline on the right-hand side, and a restore button at the bottom of the screen. Select a timeline, navigate to the items to restore, and click "Restore". Your files can be restored to wherever you like.
One of the best parts of Time Machine is that iPhoto, Address Book, and Mail items can be restored without having to worry about the underlying file system (application-level backups). Open one of these apps, enter Time Machine as mentioned above, and restore the items as mentioned above from the application itself. Very intuitive.
Restoring an internal driveRecently, I performed the following steps after upgrading my hard drive. The initial restore is painless, and took me a little over 4 hours for approximately 200GB of data. Re-enabling Time Machine is another challenge, but is not overly difficult.
- Restore from Time Machine. The unofficial Time Machine restore guide is also a good resource. It did take 20 minutes or so to get past the "Calculating space required to restore data" part, but some folks have noted a bit of patience is needed for this step.
- Re-enable Time Machine backups
- Mount the old hard drive and see if anything is needed from it before reformatting it. Some files are not backed-up by Time Machine, but they are mainly system files for caching and logs.
Restoring external hard drives
Restoring external hard drives can be a little tricky. External drives will not appear in the Time Machine restore utility unless they are mounted (connected) in Leopard. The bright side is that the mounted drives must only have the same name as the drives that were backed-up. Drive make and size does not matter.
- If you do not recall the name of the external drive you are restoring from (e.g. from a drive crash) you can determine this by "browsing the contents of your Time Machine drive in the Finder (Not in Time Machine). Double-click on the drive you are backing up to and you’ll see a folder named, 'Backups.backupdb'. In that folder will be a folder that has the same name as you computer. In that folder you’ll see a folder called, 'Latest'." Find the names of the external drives here.
- Create a disk image in Disk Utility with the same name as the missing drive and mount the image. If you are replacing an external drive, you can also name the drive using the same name as the old drive.
- You will now be able to use the Time Machine restore utility to restore files from the previously unmounted external hard drive.
Tips