How to fix the wrong Time Machine adoption for a drive swap

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

time machine el cap icon
Apple

It’s common to swap in one Mac for another, using a migration tool to transfer its files and effective identity, or to upgrade a drive in your Mac. But because macOS tracks Macs and drives with behind-the-scenes identifiers (not just their display names), Time Machine can get confused, even if you’re offered a prompt asking if you want to inherit an existing backup set for a new Mac or 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 Mac’s backup instead, one from 2012.

Before proceeding, I recommend that anyone making these changes back up your Time Machine backups! If you don’t, and something goes wrong, you could wind up losing your entire backup history, as Time Machine can be finicky. (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 should probably seek out help—it’s easy to get things wrong and wind up stymied because of the precise syntax needed to specify drive names and paths.

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

Inheritance connects a Mac to a different backup set for an entire computer, which Apple calls a “machine directory.” These sets are found in Backups.backupdb as the computer’s name. Each computer has a unique folder. (On network volumes, these appear as sparse disk image bundles, which have a .sparsebundle suffix.) 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 to fix a Time Machine backup set, because association is based on a unique identifier for each drive that isn’t tied to its hardware or name. You might need to re-associate 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. So 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 mac911@macworld.com 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.

Shop Tech Products at Amazon