Time Machine: Switching Computers
My main Mac is out of service for a few days as the screen gets replaced, so I performed a Time Machine restore onto another computer to use in the meantime. I'll let this computer continue backing up to the same time machine volume, then do a TM restore back onto my main machine when it's fixed.
On the temporary machine, Time Machine didn't want to continue backing up to the same backup folder. From Time Machine's perspective, this is a different computer and so it creates a separate folder to perform the backups in. The MAC address of the computer is set as an extended attribute (xattr) on this folder so TM knows which folder to use.
Allowing the temp machine to use the old machine's backup folder is simple, but not as easy as it should be. The goal is to put the temp machine's MAC address in the place of the original's in the xattr on the backup folder. However, using xattr -w com.apple.backupd.BackupMachineAddress 00:00:00:00:00:00
doesn't work. Instead, you need a little program that can write the address using the xattr API.
I've written a little program that performs the switch. It turns off acls on the backup volume, sets the new xattr, logs the old MAC address, then turns the acls back on. You'll need to run it with root privileges.
It's available here
2 comments:
Papin at 2009-02-27 20:26:39 -0500
Thanks for making the program available. I wish I had spotted it a month ago.
Ben Reilly at 2009-07-02 22:18:07 -0400
Excellent program! I used when I switched from my old MacBook to my new MacBook Pro. I had a little bit of trouble finding the right MAC address, but I did figure out a simple way to make sure I had the right one: I set the drive as my backup drive and began a new backup. It created the folder for the backup, then I stopped it. I ran your program for the new directory, and in doing that, your program tells me what the old MAC address was for it. I then used that address on my old directory, deleted the new one, and the backup worked fine. I also appreciate your Beer-ware License. Consider yourself beer-ed if we ever meet.