Macos – How to get Time Machine working again after changing the hard drive

backupmacostime-machine

On my Mac, I recently

  • changed to a new hard drive (e.g. after a hard drive failure) or
  • migrated the boot partition to another one

What do I have to do to get Time Machine correctly backing up my data again? It is no longer doing incremental backups.

Best Answer

Using tmutil

Disclaimer: I scanned the tmutil manpage and performed these steps. Time machine seems to be backing up happily now. I have no idea if all these steps are necessary, or if I did them in the right order. YMMV.

First disable Time Machine

$ sudo tmutil setdestination /Volumes/TIME_MACHINE_VOLUME
$ sudo tmutil associatedisk -a /Volumes/MACINTOSH_HD/ /Volumes/TIME_MACHINE_VOLUME/Backups.backupdb/COMPUTER_NAME/Latest/MACINTOSH_HD/

This tells Time Machine to backup MACINTOSH_HD the new volume to /Volumes/TIME_MACHINE_VOLUME/Backups.backupdb/COMPUTER_NAME/Latest/MACINTOSH_HD/ which is the old backup repository for the old volume. In my case the old and new volumes both have the same name.

$ sudo tmutil inheritbackup /Volumes/TIME_MACHINE_VOLUME/Backups.backupdb/COMPUTER_NAME/

This connects the old backup repository to the new volume.

Then run:

$ sudo tmutil listbackups

To list the backups, if the above has worked you should see all the backups you had for the old volume.

Related Question