Time Machine

Automatic backup software built into Apple’s Mac OS X 10.5 (Leopard)

Time Machine works by backing up changed files to an external drive once per hour (by default — some hacking can be done to change this interval). It keeps 24h of backups, daily backups for one month, and weekly backups until the drive fills up.

While it may seem that all these backups can use an incredible amount of disk space, Time Machine gets around this requirement with cunning use of hard links — a very old Unix construct where more than one directory entry can point to the same file contents, in essence creating two directory entries that are exactly the same, and stored only once. Apple has enhanced hard links to be able to hard link to directories as well. In this way, the software can create backups of unchanging whole directory trees (eg., /System), and yet the backups are entirely browsable and look like complete copies, because they are complete copies, at least at the directory level.

Time Machine silently postpones backups if the machine is on battery power, and also silently postpones backups if the backup drive becomes disconnected. While that could be a problem, Time Machine will warn you if it hasn’t performed a backup in 10 days.

Backups are stored on the Time Machine Volume within a backups.backupdb directory structure, with the machine name underneath, meaning that multiple machines can use a single Time Machine volume.

Beginning with the 0.2 upgrade, Time Machine places an icon in the menubar, which animates when a backup is being performed, and has a pull-down menu showing progress during a backup, date of last backup, and entries to force a backup, enter the restore UI, and open the preference pane.

The Time Machine preference pane includes an iPhone-ish slider for disabling Time Machine, select a different destination, and exclude folders from backup.

Time Machine includes an innovative UI, designed to make restoring backups a simple (and perhaps even enjoyable) experience. Upon entering the Time Machine UI, the desktop drops away and a space-themed UI appears, showing folders behind the current folder, and arrows and a time line for ‘travelling back in time.’ A user browses back through time to find the folder that has his old file, selects the file, and hits restore. The desktop returns, and the old file is copied back to the current folder. It’s slick, easy, and intuitive.

Some apps are also Time Machine-aware. Mail.app and iPhoto can both show their native windows in Time Machine, allowing the user to go back to previous mail folders and photo libraries.

Using a network drive as a Time Machine volume is a possibility. The volume must be shared via AFP. In this case, Time Machine creates a sparse HFS+ volume on the drive (necessary for the hard link magic). While Apple’s own Airport Extreme Base Station includes support for an external disk, it cannot be used as a Time Machine volume, despite this being a bullet point on the pre-release Leopard marketing material. Instead, Apple introduced the Time Capsule, which binds an Airport Extreme Base Station with an internal drive, at 500GB and 1TB capacities. The Time Capsule also has support for external drives, and, on this device the external drive can be used as a Time Machine volume. It is unknown what differences in the hardware or software on the two devices would be responsible for this behavior, or if it’s just Apple, Inc, wanting to sell yet another device.

Notes

  • To force a Time Machine backup from the command line:
    /System/Library/CoreServices/backupd.bundle/Contents/Resources/backupd-helper &

Resources

Tagged as:

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.