Keeping backup history when switching to a new Mac


If you use a Mac, I highly recommend using Apple’s Time Machine feature to maintain local data backups (you should also of course maintain off-site backups).

Time Machine works best with a NAS, like Apple’s own $299 Time Capsule, as it can then take frequent snapshots of your disk without you even noticing. This is a life-saver – I cannot count the number of times it has saved my butt by enabling me to quickly restore a file that I had modified or deleted by accident.

I recently replaced my Mac, and was keen on keeping Time Machine’s backup history from my old Mac, so that I could for example pull in the version of a file from a week ago into my new Mac if I needed to.
If you’d used the OS X Migration Assistant to move data from your old Mac to your new one, Time Machine will ask you whether you want your new Mac to “inherit” the old one’s backup history. However, if you’d manually transferred the files over like I did, Time Machine will blow away all of your old backups and create fresh ones from your new Mac. Not exactly the best outcome.

With the help of this page, I managed to figure out how to instruct Time Machine to inherit the backups; it took me a while however since the steps for various scenarios are confusingly mixed together in that one page, so I thought I’d document just the steps I used for my Time Capsule (i.e. NAS) based setup.

Note that all the steps described below must be performed on your new Mac.

Step 1: Turn off Time Machine on your old Mac to be safe. System Preferences > Time Machine > Off.

Step 2: On your new Mac, Open up Finder and locate your Time Capsule under the Shared section. Click on the Time Capsule, then double-click on Data. The sparse bundle with the name of your old Mac should appear in the next column as shown below.

Step 3: Open up Terminal and list /Volumes. Confirm that there is a Data directory with a sub-directory containing a .sparsebundle file with the name of your old Mac.

Step 4: Run the following command in Terminal, replacing Arun's Mac with whatever the folder is called in your case (Bash auto-completion comes in handy here!):

Step 5: Wait until the command completes, then go back to Finder and double-click on the .sparsebundle file to mount it. The Time Machine disk will be mounted and show up under the Devices section as shown below.

Step 6: Go back to Terminal and list /Volumes again. Confirm that there is now a Time Machine Backups directory with a sub-directory named Backups.backupdb.

Step 7: Run the following command in Terminal, replacing Arun's New Mac and Macintosh HD as appropriate (again, Bash auto-complete is the way to go):

Step 8: Go back to Finder, locate the mounted Time Machine Backups disk under the Devices section, and eject it. Now locate your Time Capsule under the Shared section, and eject that as well.

And that’s it! Go ahead and enable Time Machine on your new Mac. Moving forward it will backup files from your new Mac, while allowing you to pull in files from the backup history of your old Mac whenever you need it.