How Time Machine Works its Magic

How Local Backups are Stored

Previous      Frequently Asked Questions        Works Overview      Troubleshooting       Contact     Next   

 

Previous      Frequently Asked Questions        Works Overview      Troubleshooting       Contact    Next   

Since Time Machine has the ability to back up multiple volumes (different disks and/or different partitions on the same disk), and/or multiple Macs, all to the same place, things can get a bit complicated.

Backups made to an internal or directly-connected external HD are stored in a single Backups.backupdb folder at the top level of the drive.  If you back up multiple Macs to the same volume (by connecting it to each Mac in turn), they're all in the same Backups.backupdb folder.

However, for backups made over a network (Ethernet or wireless), the Backups.backupdb folder is inside a container called a sparse bundle disk image.  See How Network Backups are Stored for details on them. 

Either way, the structure of the Backups.backupdb folder is the same (Finder in List View):


                                                                   

One folder per Mac (blue); within that, one folder per backup (green); within each of those, one folder for each volume (drive or partition) (red).

However, there's more than meets the eye. While it shows the Mac's name and the names of the various partitions, that's not how they're really identified:


Each Mac is identified by a hardware address internal to the Mac.   It's embedded in the Logic Board (motherboard).  The hardware address isn't displayed in the backups, but is kept in an extended attribute of the folder representing the Computer.

That's why when you get a new logic board, Time Machine thinks you got a new Mac.  That's also why you can rename your Mac (System Preferences > Sharing) and Time Machine will automatically rename the Computer folder on the backups;  or you can have two Macs with the same name, but Time Machine still knows which backups belong to which Mac.  

On Snow Leopard or later, under some circumstances, if you get a new Mac and transfer your data from the old one, you should be asked if you want to "inherit" (or "reuse" on Snow Leopard) the old backups.  See Troubleshooting item #B5 for details.  If you select that option, the name and hardware ID are changed, so the backups appear to have been made from the new Mac.  If you aren't asked, or got a new Logic board, on Lion or later you may be able to do that manually, per Troubleshooting item #B6.


Each Backup is placed in a folder named for the date & time of the backup.  Both the start and completion timestamps are kept in extended attributes, among other info.


Each volume (drive/partition) that was backed-up is represented by a folder.  It contains the same structure of folders, sub-folders, and files as on the original volume.  Most of what you see, however, aren’t really files and folders at all;  they’re those hard links to the actual files and folders, as detailed in the tan box above.

For an OSX volume, such as Macintosh HD in the sample, user home folders are inside a Users folder (orange arrow).

The volume folder is also identified by its UUID (Universally Unique IDentifier).  That's not displayed, but is kept in an extended attribute on the folder for each volume.

That's assigned whenever you erase or reformat a partition, and is shown when you select the volume via Disk Utility (in your Applications/Utilities folder) and click the Info icon in the toolbar.  

Similar to the above, that's why you can rename a drive/partition, or have two with the same name, but Time Machine still knows which is which.  It's also why, when you replace or erase your startup drive or do a full restore to it (the installer erases it first), it's treated as a different one.

And it's why, if you replace a drive, and give it the same name as the old one, Time Machine still knows it's a different one. 

On Snow Leopard or later, if you select the "inherit" or "reuse" prompt, that will also identify the new Mac's startup drive with the backups of the old one, and change both the name of the folder and the UUID(s) of all the old backups, so they appear to have been made from the new one. 

Or, also on Snow Leopard or later, if you replace or erase your startup drive, under some circumstances Time Machine should automatically "associate" the new or erased drive with the backups of the old drive.  If it doesn't,  on Lion and later you may be able to do that manually, per Troubleshooting item #B6.


The ".inProgress" package

While a backup is running, the data is collected in a "package" (looks like a file, but is actually a special type of folder).  When the backup completes normally, it's converted into a normal backup folder (like the ones outlined in green), so you'll rarely see one. 

If the backup fails or is cancelled, though, it will remain.  On the next backup, Time Machine will "recover" the partial backup and convert it into a normal one.  This means it doesn't have to copy everything all over again;  just new changes and things that weren't copied before.

Since it's not a complete backup, you'll never see this via the Time Machine browser (the "Star Wars" display),  and you can't restore it with a full system restore, or use it with Setup Assistant or Migration Assistant, as the results would be incomplete at best. 


The Latest alias

This points to the latest successfully completed backup.  Any left-overs from a failed or cancelled backup is in the ".inProgress" package above.