Filed under: Accessories, Hardware, Hacks, How-tos, Terminal Tips
Mac 301: Time Machine backups after your Mac's brain surgery
As I've discovered recently, one of the unfortunate side effects of having the logic board on your computer replaced (aside from the potentially hefty bill involved if your AppleCare has lapsed) is that your Time Machine backups won't play nicely with your Mac after the repair if you're using a Time Capsule. Replacing the logic board is essentially like getting a whole new Mac; though all the data on the hard drive is identical, the new logic board will have different hardware identifiers (specifically, the MAC address) that will tell your Time Capsule, "This is a new Mac that's never been backed up before. Please treat it as such." The Time Capsule, doing as it's told, will fumble along and create a new Time Machine backup while ignoring the old backups completely.
Your options then are these:
1. Scrap your old Time Machine backups and start fresh. There may be an allure to this, but it's almost certainly unnecessary, and you can lose months of perfectly good backups. Plus, you then have to deal with the incredibly long first Time Machine backup all over again.
2. Hack your Time Machine backup using the following procedure, which will allow you to resume Time Machine backups as though your logic board was never replaced.
First, some disclaimers.
Disclaimer 1: If the Terminal's black text on white background fills you with a sense of foreboding and panic, you probably should not attempt this procedure. Typing the wrong thing in the Terminal can result in very, very bad things happening to your computer, from which recovery may be all but impossible. This is the kind of procedure that shouldn't be attempted if you're even slightly uncomfortable doing so. Proceed at your own risk. (cue spooky music and jazz hands)
Disclaimer 2: I didn't come up with this procedure. The extent of my Terminal knowledge can best be described as, "Knows correct answer when told." This procedure was developed by macosxhints.com user kohlmannj, and is reprinted below. It's particularly geared toward Time Capsule owners, but it should work for other types of Time Machine backups as well, with a little modification.
Disclaimer 3: Given #2, we can't fix your machine if you break it. TUAW isn't responsible for user error, wacky non-standard setups that go wrong when introducing a non-native species, etc. In other words, and as with all hacks, you do this at your own risk. (again, cue spooky music and jazz hands)
In the code that follows, everything that's in bold needs to be replaced with values from your own Mac and Time Capsule. "Time Capsule" is the name of the internal disk of your Time Capsule, and "Backup of MyMac" is the name of the sparsebundle disk image volume that mounts when you normally back up to your Time Capsule. You'll want to replace these placeholder values with whatever your volumes are actually named; if your Time Capsule is named "Ren", then replace "Time Capsule" with "Ren"; if your Mac is named "Stimpy", then replace "Backup of MyMac" with "Backup of Stimpy".
The old MAC address (from the old logic board) used in the code below is 00:f9:e8:d7:c6:b5, with the new MAC address (from the new logic board) being 00:1a:2b:3c:4f:56. Note that your MAC addresses will be different; again, the MAC addresses used here are only placeholders. You will need to determine your specific MAC addresses before beginning.
If you don't know how to find your computer's MAC address, then in all honesty, you probably should just stop right now and not attempt this procedure. But if you're really anxious to tickle the Devil's tail anyway, then here's how to find your MAC address:
Go to System Preferences, and select "Network". On the pane that follows, click "Advanced". The first tab on the left should be "Airport" - click it, and your Airport ID will display toward the bottom of the pane. This is the MAC address of the new logic board.
The old MAC address from your old and busted logic board is easier to find - it's the string of numbers and letters after the underscore in the name of the sparsebundle disk image of your old Time Machine backups.
Once you have all the relevant info and have Terminal up and ready, it's time for some UNIXy goodness.
1. Double-click your old sparsebundle disk (MyMac_00f9e8d7c6b5.sparsebundle) image and mount that volume on your Desktop.
2. Input the following commands in Terminal:
$ sudo fsaclctl -p/Volumes/Backup\ of\ MyMac -d
$ sudo xattr -w com.apple.backupd.BackupMachineAddress 00:1a:2b:3c:4f:56 /Volumes/Backup\ of\ MyMac/Backups.backupdb/MyMac
$ sudo fsaclctl -p/Volumes/Backup\ of\ MyMac -e
$ cd /Volumes/Time\ Capsule
$ sudo mv .00f9e8d7c6b5 .001a2b3c4f56
$ sudo mv MyMac_00f9e8d7c6b5.sparsebundle MyMac_.001a2b3c4f56.sparsebundle
3. Quit out of Terminal, eject the Time Machine backup image volume, and manually initiate a Time Machine backup whenever you can leave your Mac in one place and awake for a few hours.
If you're curious what all of the above terminal gobbledygook means, here is macosxhints.com user kohlmannj's translation:
"What we've done here is we've disabled and re-enabled ACLs within the sparsebundle volume (where Backups.db actually is) and used xattr to change the MAC address in the manner shown in the original hint. Next we went to the Time Capsule's volume and changed the MAC address file and the name of our backup to both reflect our new MAC address. I'm fairly certain this should work for Time Capsule-based TM backups...it has worked for me, so best of luck."
Translation of the translation: it tells the Time Capsule to forget about your old, dead logic board and tells it to play nice with the new one. End result: you get to keep all your old backups, and Time Machine will work as though nothing ever happened -- almost.
The first Time Machine backup will see your old backup's disk image mount successfully, but the first backup will seem to take forever, with the status stuck on "Preparing..." for as much as several hours. The reason: since your logic board just got replaced, it's probably been several days since your last Time Machine backup, so Time Machine has to do something called "deep traversal" (which you can see if you fire up Console during the backup) - essentially, your Mac and the Time Capsule have to do a bit-by-bit comparison of pretty much your entire hard drive to find out what's changed since the last backup. Depending on the size of your main drive, this can take a long time -- it took a couple of hours on my wife's MacBook's 120 GB hard drive -- but it won't take nearly as long as starting your Time Machine backups over from scratch would have.

![TUAW [Cafepress]](http://www.blogsmithmedia.com/www.tuaw.com/media/tuaw-cafepress-promo.png)


Reader Comments (Page 1 of 2)
Brian said 5:08PM on 7-20-2009
Wish I had this article a week ago, but I'm not sure it would have done me any good. I spent 2 hours on the phone with Apple tech support with no luck. Ended up erasing my old Time Machine backup so that I can start a fresh one. I am usually very happy with Apple and their products, but I have to admit this was more than a little frustrating.
Reply
Joseph said 7:06PM on 7-20-2009
same thin applies for new hard drive, just different location of uuid
THJ said 5:12PM on 7-20-2009
I've done it twice now with the instructions from the mac hints site (same as this post), and it's a little tricky (first time took me over an hour, second time about 20 minutes.
What helped me was copy/pasting everything into textedit, then subbing in my values for the stock values. Also, double and triple check everything.
Reply
rhorer said 6:22PM on 7-20-2009
I found out today that Time Machine is worthless for doing a complete restore. It's great for retrieving an accidentally-deleted file here or an "oops, I didn't mean to save the modified version on top of the existing one" there, but keep a copy of SuperDuper handy.
I got a new MacBook Pro recently when my PowerBook died. My Time Machine backup wasn't current but I was able to remove the hard drive from the dead PB and use Migration Assistant to copy everything over from it. Due to circumstances too involved to explain here, I exchanged the MBP today for a new one. I asked the guy at the Genius Bar about ensuring that all my software licenses copy over to the new machine, and he said "no problem, just restore from your Time Machine backup." This time, my TM backup was current. I got the new machine home, fired it up, told Migration Assistant to restore from the TM backup, and waited about an hour for it to finish. When it was done, iWork wouldn't run, Photoshop wouldn't run, and several other programs wouldn't run. They all said that critical files were missing and that I should reinstall from the CD/DVD. Since this exchange was a planned event, I used SuperDuper to clone the hard drive before I took the MBP in for exchange. When nothing worked from the TM restore, I decided to run Migration Assistant again, this time migrating from SuperDuper's clone. Everything worked perfectly and took less than half the time. Come on, Apple, you can do better than that!
Reply
Josh said 6:45PM on 7-20-2009
I've actually had to restore from my Time Machine backup a couple of times (once to test and once for real) and it really does work quite well. The problem is terminology. Migration assistant does migrations, not restores. It moves, what it thinks, are important files and settings but does not grab everything. It generally does a good job but it's not perfect and it is not meant for what you were trying to use it for.
To do a restore from a Time Machine backup you cannot be booted from the hard drive. The reason for this is that you will need to overwrite files that are normally in use when the system is running. To do a restore from a Time Machine backup, boot from the Leopard installation DVD. Under, I believe, the Utilities menu it offers a "Restore from Time Machine" option. You then can pick the date/time of a backup to make your machine look just like it did on that date/time. This should generally work as long as both machines are Intel's (PPC -> Intel will not work and there a couple laptops that are a little funky).
The Genius at the bar should have been a little more specific about the actual steps to accomplish what you wanted to accomplish. People that are involved in technical support often forget to mention steps that, we think, are obvious because we deal with it all the time.
Geoff said 2:05AM on 7-23-2009
@rhorer: I did a complete restore from a Time Machine backup after my iMac's hard drive failed (just after the warranty expired; I did it myself) and it worked like a charm. Perhaps you excluded some critical system directories for Time Machine's backups?
Harvey said 9:04PM on 7-30-2009
I just had my early 2008 MBP replaced with a new one. I did the following:
1. Complete Restore from Time Machine backup
2. Archive & Install (over the restore) ***
3. Copy the archived /etc/cups to /etc/cups to get your printers back.
*** The second part fixes all kinds of driver issues that were present after step 1 because it was a different model machine.
Nick said 6:24PM on 7-20-2009
I had the logic board replaced in my MacBook several months ago, however I never noticed an issue when I resumed backing up to my Time Capsule. After reading this article, I got a little concerned. I haven't had to access any data from my backup since I have had it replaced, and regular backups seem to be going fine. Not sure if I should just go ahead and try the hack or just let it go, and hope nothing goes wrong.
Reply
Chris Rawson said 7:16PM on 7-20-2009
There's a couple ways you can check to see if you're running off your old backups or not.
First, when you look in your Time Capsule's drive, there should only be one copy of the sparsebundle disk image associated with your Mac. If there's more than one, you probably lost the association with your old backups at some point.
Second, when you go into Time Machine, try to access backups from a date before the logic board replacement. If you can't, or there simply aren't any there, then once again you've probably lost association with the old backups.
Since it's been a couple months since your repair and backups have been proceeding normally since then, if the backups from before the repair aren't accessible, then it's really up to you which backups are more important, and that will affect whether or not you want to do the procedure in my post. While this hint works well if you're just starting out with Time Machine backups directly after having a logic board replaced, I don't know of any way of consolidating several different sparsebundle disk images into one.
Joseph said 7:20PM on 7-20-2009
restore a mundane file.
c0rnpwn said 7:13PM on 7-20-2009
If you don't want to deal with the terminal stuff, but want a quick and easy script that does the aforementioned lines in the article, check this out:
http://www.macosxhints.com/article.php?story=20081216145458979
Reply
Dan said 8:34PM on 7-20-2009
Good article. Another way to find the MAC address:
Menu bar -> Apple menu -> About This Mac -> More Info... -> Network -> Locations -> Built-in Ethernet -> Hardware (MAC) address [underneath the BSD Device Name: en0 line]
Reply
mike_drechsel said 10:13PM on 7-20-2009
Thanks for the write-up. I literally received my MacbookPro back from AppleCare today and was trying to figure out why my TimeMachine backups were not working. This was perfectly timed.
One note: I followed the steps outlined above, but without success the first time. I thought about it for a minute and tried again with one modification. If the issue is that the logic board has a different MAC address once replaced, then it wouldn't be the Airport MAC address that would be the problem (since the Airport card hasn't been replaced). It would be the MAC address assigned to the Built-in Ethernet. Once I swapped in the Ethernet MAC address for every instance that you used the Airport MAC address, the instructions worked perfectly.
To track down your Built-in Ethernet MAC address, use "System Profiler" (in Applications/Utilities/). Click on "Network" in the left sidebar. Then select "Built-in Ethernet" from the "Active Services" list. You'll find the ethernet MAC address near the bottom of the info pane.
Thanks again.
Reply
Jason said 10:34PM on 7-20-2009
Doing this with an external drive is similar. Because the backups aren't stored in a sparseimage file, you can skip mounting the file in step 1.
The last step:
$ sudo mv MyMac_00f9e8d7c6b5.sparsebundle
MyMac_.001a2b3c4f56.sparsebundle
can also be skipped as there's no sparsebundle to mess around with local backups.
Also: Be sure to use your built-in Ethernet MAC address and not AirPort. I'm not sure what the MBA uses (probably AirPort address) or the MacPro with 2 Ethernet ports (I'd guess it'd use port 1)
Reply
ZericO said 6:46PM on 7-24-2009
Thanks for the clarification on external drives:
1) Where can you locate the old ethernet MAC address if not contained in the underscore name an old sparsebundle disk image for Time Capsule?
2) Would the appropriate MAC address for the FireWire 800 port be identical to the one found under:
System Profiler -> Network -> Active Services -> Built-in FireWire?
Thanks everyone!
Jason said 7:00PM on 7-24-2009
In Terminal, you can go to:
$ cd /Volumes/Time\ Capsule
(Or whatever your Time Capsule volume is)
and then do an:
$ ls -ah
And you should see a 'dot' file like this:
.00f9e8d7c6b5
That is the old mac address. In the instructions, you'll move the file to a file name that has your new mac address:
$ sudo mv .00f9e8d7c6b5 .001a2b3c4f56
(00f9e8d7c6b5 is the old MAC, 001a2b3c4f56 is the new MAC)
Re: Firewire MAC address, Time Machine doesn't care about that. It's just looking at Ethernet MAC addresses.
Hope that helps!
PK said 2:06AM on 7-21-2009
This happened to me as well, a number of months ago. I was unhappy that Apple didn't warn me: the "geniuses" always ask if you have a Time Machine backup, but not a word about the workaround that would be needed to handle the new logic board's MAC address.
I was able to google for the solution and carry it out, but I would think that a non-Unix-literate user would be fairly daunted by it. Apple needs to step forward and alert people to this common use case; it might even be possible to script the workaround for people.
Reply
THJ said 11:57AM on 7-21-2009
I also highly recommend purchasing SuperDuper or Chronosync to keep a 'live' bootable backup of your HDD on a separate external from your TM backup (and if you're paranoid like me, an offsite backup service like Mozy just in case your house gets picked up in a tornado and dropped in Oz). Having the live backup means that even if your internal HDD goes kaput, you can be back up and running in 5-10 minutes instead of hours or days.
Reply
elliot said 3:05PM on 7-21-2009
This sounds like something that Apple should have planned for in the software. I had a first gen mbp that had several logic board replacements done before it was exchanged for a new one, but I wasn't using Time Machine then, perhaps it hadn't come out yet. Point being: this is something Apple has to deal with a lot, and should have a system in place to deal with instead of people needing a hack.
As to the guy who lost his software licenses using migration assistant: you need to do your Time Machine restore off of the Leopard install DVD like the other guy said. I've done it and it works fine.
Reply
DylanMorgan said 11:26PM on 7-22-2009
The terminal commands are available to service providers. If you bring in your backup disk when you pick up your system after an MLB replacement the service provider should be able to do it if terminal isn't your thing.
@rhorer-are you restoring from a TM backup that has all system files included (and the /Library?) if so, the restore should have worked through migration assistant. One thing to try in the future is booting to the installer and running the "full system restore" from the installer.
Reply