How to make sure Time Machine works when you upgrade your hard drive

You have to turn to the Terminal to make certain kinds of Time Machine swaps work.

time machine el cap icon 100645774 orig

Today's Best Tech Deals

Picked by Macworld's Editors

Top Deals On Great Products

Picked by Techconnect's Editors

When you attach a new external drive for your Time Machine backups, or upgrade the hard drive in your Mac (the one that's being backed up), it can cause some confusion for Time Machine. macOS tracks drives with behind-the-scenes numbers, not just their display names, and if you swap drives, this can often confuse Time Machine or result in a prompt asking if you want to inherit an existing backup set for a new drive. If macOS gets it wrong, you have to turn to the Terminal command line and type in text commands to get things back on track.

Macworld reader Richard had a mismatch happen to him when he upgraded to a new Mac by using a Time Machine backup for migration. He was prompted to inherit the old machine’s backup—the one he just used, ostensibly—but macOS picked incorrectly, and shifted him to a completely other backup instead, one from 2012.

Before proceeding, I recommend that anyone making these changes back up your Time Machine backups! Time Machine can be finicky, and if you don’t back up your backups and something goes wrong, you could wind up losing your entire backup history. (You can just copy your Time Machine drive’s Backups.backupdb folder to another HFS+ drive—not to an APFS-formatted one! APFS-formatted drives do not currently support Time Machine, but you won’t be warned.)

If you’re not comfortable with following instructions to enter commands into the Terminal, you might see if you can find someone who is so you don’t wind up feeling at sea.

Time Machine reconnections

Apple offers two different types of Time Machine reconnections: inheritance and volume association.

Inheritance connects a Mac to a backup set, which Apple calls a “machine directory.” These are found in Backups.backupdb as the computer’s name. Each computer has a unique directory. When you migrate from one Mac to another and want to connect the existing Time Machine backup, you inherit it, and thus transfer the computer identity in the Time Machine backup to your new Mac.

Volume association relates to each disk volume within a set. These are nested inside of “snapshot volumes,” and look something like this in their full path: Backups.backupdb/Glenn’s Mac/2018-03-03-123456/My Mac Drive. There are a lot of cases in which you use association, because association is based on a unique identifier for each drive that also changes when it’s erased. For example, you might need to re-associated when you:

  • Erase a drive and restore its contents.
  • Swap a drive in your Mac and restore its contents.
  • Upgrade to a new Mac and migrate your old Mac’s data to it.

In the following examples, you’ll be dragging a folder from the Finder into the Terminal, which if you haven’t done before may seem like a strange mix. In fact, it’s the best way to ensure you get the path exactly right without having to type it by hand. Dragging also “escapes” (puts a backslash in front of) spaces and correctly represents other special characters so they’re read correctly in the Terminal.

And you’ll need to have administrative privileges on the Mac with the account you’re using.

To inherit a machine directory when switching Macs:

  1. Paste into the Terminal: sudo tmutil inheritbackup
  2. Type a space.
  3. Drag in your Time Machine machine directory after the space. If it’s a networked volume, drag the file named Computer name.sparsebundle—don’t double click it, which will mount it.
  4. Press Return.
  5. Enter your password if prompted.

The inheritance should be complete.

Now for each volume or if you’re just swapping volumes, change associations. You’re pairing a current volume with a volume nested in a snapshot within a machine directory, to use Apple’s language. Follow these steps:

  1. Paste sudo tmutil associatedisk -a (the -a means to match and update all identical volumes, so you only need to do this once)
  2. Type a space.
  3. Drag the new or replaced Mac volume you want to associate with an old volume’s backup into the Terminal.
  4. Type a space.
  5. Drill down within the Backups.backupdb folder to the computer name then the Latest snapshot and then the drive name you want to associate. Drag that drive into the Terminal after the space. If it’s a networked volume, you may have to double-click the disk image to open it and then double click Latest to get to the volumes.
  6. Press Return.
  7. Enter your password if prompted.

Time Machine will try to sync volumes and only backup files changed since the last snapshot if all goes well.

Ask Mac 911

We’ve compiled a list of the questions we get asked most frequently along with answers and links to columns: read our super FAQ to see if your question is covered. If not, we’re always looking for new problems to solve! Email yours to including screen captures as appropriate, and whether you want your full name used. Every question won’t be answered, we don’t reply to email, and we cannot provide direct troubleshooting advice.

Note: When you purchase something after clicking links in our articles, we may earn a small commission. Read our affiliate link policy for more details.
Shop Tech Products at Amazon