6

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.

1

4 Answers 4

10

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.

1
  • Can confirm this still works as of macOS Sierra in 2017. tmutil doesn't seem to like spaces in the name of the backup drive though (even when escaped or quoted), so make sure to rename the mounted sparsebundle volume or drive to a one-word name. May 1, 2017 at 3:30
4

0. Notes

First, disable Time Machine. Then, make sure you have a backup of your important stuff and don't solely rely on the Time Machine disk. You can break things here.

Also note that you should only do this if you want to have incremental backups again. If you don't care about your previous backups, you can skip this thing and just let Time Machine create a second one.

1. Prerequisites

Anyway: You need the fsaclctl command for the following steps. If you are on Snow Leopard, you can get it from the Leopard install disk. On Leopard, it is included already (skip to the next part).

You can also download a package here or here. Extract it, right-click the EnableACLs.app and select "Show Package Contents". Navigate to Contents/Resources and copy fsaclctl to your Home folder (/Users/<your-username>).

2. Find out your new UUID

Open Disk Utility.app, and select Info on your Mac disk. Here, copy your UUID somewhere else. You will need it later.

enter image description here

3. Check your old UUID

Then, open up a terminal and go to the latest backup on your TM disk:

cd /Volumes/<time-machine>/Backups.backupdb/<your-mac-name>/Latest

Replace time-machine> and <your-mac-name> with the name of your Time Machine Volume and your Mac's name, respectively. Now, let's find out the UUID that's currently stored on your disk:

sudo xattr -pl com.apple.backupd.SnapshotVolumeUUID "Macintosh HD"

Replace this with the actual name of your partition (in my screenshot, it was "Macintosh HD"). As you can see, in my case the UUIDs match. In your case, they won't.

If they do, stop here, something else might be the problem!

enter image description here

4. Replace the UUID on the Time Machine volume

You now need to disable ACL protection on the drive using the fsaclctl command.

sudo fsaclctl -p /Volumes/<time-machine> -d

If you've copied it to your Home folder, use this instead:

sudo /Users/<your-username>/fsaclctl -p /Volumes/<time-machine> -d

Now, this is the critical line. You need to overwrite the old UUID to the one of your current disk (i.e. the one found through Disk Utility). Replace the XXX… with the UUID you copied at the beginning.

sudo xattr -w com.apple.backupd.SnapshotVolumeUUID XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX "Macintosh HD"

So this might look like:

sudo xattr -w com.apple.backupd.SnapshotVolumeUUID 650DDECD-CC5E-3552-9960-2D50014A4BDB "Macintosh HD"

After you're finished, re-enable ACL again:

sudo fsaclctl -p /Volumes/<time-machine> -e

As before, if you've just copied it to your Home folder, do this instead:

sudo /Users/<your-username>/fsaclctl -p /Volumes/<time-machine> -e

Don't forget to re-enable Time Machine and see if it works now. Note that the next backup may take a while, even a couple of hours.


I did a similar procedure once, which became necessary after switching the logic board of my Mac.

This is gathered from:

4
  • I wonder if it ever applies to changing the harddisk? (Logic board: yes, or partly; I've done the trick with the MAC address in 10.5 though I'm not sure if all is still needed in 10.7.)
    – Arjan
    Oct 4, 2011 at 20:08
  • @Arjan Hard disk: From what I've read and personal experience: Can happen. Logic board: Definitely, but you have to change the MAC address, similar to here. Lion: I haven't been on 10.7 yet, so it might be different there?
    – slhck
    Oct 4, 2011 at 20:10
  • Thinking about it, maybe this does answer the other question. I figured 92GB was just a part of the harddisk, but maybe it's actually the full disk...?
    – Arjan
    Oct 4, 2011 at 20:12
  • Could you detail the procedure for OSX 10.7.5 (if different) Thanks !
    – toto_tata
    Dec 23, 2012 at 0:22
3

Concerning 10.7+:

Please note that slhck's elaborated answer does NOT apply to 10.7 and above. For 10.7+, see tmutil manpage, sections inheritbackup and associatedisk.

1
  • Can you detail the procedure for Mac OSX 10.7 ? Thanks !
    – toto_tata
    Dec 22, 2012 at 23:36
1

In my case above answer helped a lot but I modified it a little.

Before reading this I was trying to use inheritbackup command but though it didn't finish with error the time machine was still not seeing my disk and my sparsebundle as the backup.

What seems was needed first was the setdestination command. and now I'm writing this as my Time Machine backup is being updated!
So in the end I first did:

sudo tmutil associatedisk -a /Volumes/Macintosh\ HD /Volumes/Time\ Capsule/Backups.backupdb/<mymacname>/Latest/Macintosh\ HD/

and then:

sudo tmutil inheritbackup /Volumes/Time\ Capsule/<mymacname>.sparsebundle

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .