Backup roundup (part 4) - Apple Time Machine on Mac

With the latest incarnation of Mac OS X, Apple incorporated a clever backup approach. The core approach is quite standard: copy all the files to another drive, then provide a client interface which will copy files back again.

Behind the scenes, on a local drive, your backups live in a folder named Backups.backupdb; each machine backed up gets its own folder (named after the machine name) within that. That in turn contains one folder for each backup, named in the form YYYY-MM-DD-NNNNNN, plus one symbolic link named Latest which points to the most recent backup.

Inside that, you will find a folder for each backed up volume, with the same name. At first glance, it looks as if every backup contains a complete copy of the volume as it was when the backup was made — in reality, however, most of these files are hard links to existing copies: each new backup adds only the files which have actually changed since the previous one, saving a great deal of disk space. (This is almost exactly the approach used by BackupPC for network backups, except that BackupPC uses symbolic links and compresses the files.)

This is very simple, robust and efficient: your backup files are simply files, in a standard Mac OS (HFS+) file system. (One interesting technical note here: where an entire directory is unchanged from one backup to the next, rather than hard linking the individual files, Time Machine hard links the directory itself, a facility of Leopard which probably surprises a lot of Unix purists. Ars Technica has an article giving a more detailed description of Time Machine innards for the curious.)

For some reason, Time Machine does not use the same approach when backing up to a network drive: instead, it creates a ‘sparsebundle’ file system image (a virtual drive, consisting of multiple 8 Mbyte segments) and mounts that to perform backups. It also identifies the backups by MAC address, rather than computer name. This approach gives two drawbacks: first, you can’t switch between local and network access to the same drive (or at least, this will give two separate sets of backups: you cannot back up locally then restore over the network, or vice versa), and secondly in practical usage I soon lost my backups to file system corruption within the remote disk image. (The corruption was serious enough that Disk Utility indicated the volume was not recoverable, meaning my backups were lost.) Performance was also extremely poor over the network compared to local access: far slower than the network connection would explain.

The performance and corruption issues may be an issue with using a standard USB disk attached to an Airport Extreme base station, as opposed to a dedicated Time Capsule appliance, but I would hesitate to recommend relying on Time Machine over the network at present. This is a shame: clearly, backing up over the network would be a lot more convenient than attaching a backup disk directly to my MacBook Pro. As a result, my present backup arrangements combine Mozy (backing up whenever I have an Internet connection) with Time Machine to a USB drive whenever it is connected. Others have experimented with backing up via Time Machine to iSCSI devices or network shares with mixed results.

In the longer term, I suspect Apple will be integrating the snapshot facilities of Sun’s ZFS with the Time Machine user interface, so you can get access to previous versions without the need for a second drive. This won’t guard against file system corruption, disk failure or loss or theft of the device, but is much more convenient for laptop users. I haven’t tried it, but it may even be possible to achieve this right now with the ADC ZFS support; it certainly won’t involve major changes to the innards of Time Machine. ZFS also has integral compression support, which would add compression to Time Machine’s backups without any extra effort.

Features and advantages

Limitations and problems


Use it, but with directly connected storage not a network device! Best used in conjunction with a remote backup solution such as Mozy (or Carbonite, once available) to get the best of both worlds: instant access to individual old files, with access to a complete remote backup for disaster recovery.

Subscribe via FeedBurner Add to Technorati Favorites

blog comments powered by Disqus