So I've had huge nightmares over the past few days over Time Machine.
So I've always been a big proponent of Time Machine. I always tell everyone that you NEED a backup solution, and while Time Machine may not be the be all and end all, it's a great starter solution for those that don't want any fuss.
But perhaps not anymore.
It just works, right? Well apparently not.
So a little while ago I performed a Time Machine-assisted hard drive swap for a MacBook (not mine). That is, I install a new drive, boot from SL DVD, perform a HD wipe, then restore from Time Machine. It seemed to go well.
Fast forward to more recently, I went on a trip overseas (Taiwan). While there, I obviously took a lot of photos, and it became that time again - purchase a new hard drive with more capacity for my MacBook Pro! HD were a little cheaper where I visited, so I not only bought a new drive for my MBP, but also a new drive for my wife's MB, as well as new external drives to upgrade our Time Machine drives.
While I was there, I decided to update my own Time Machine first - following the instructions from Apple's own knowledge base on the matter:
I transferred my existing backups to the new drive to continue my Time Machine. I didn't notice any problem at the time.
Then I returned to my home country (New Zealand). First thing I did when I got back was to perform the Time Machine-assisted HD swap after making sure the OS were up-to-date as were their respective backups, on both my own MBP and my wife's MacBook.
That's when the troubles started.
First off, I noticed that a few images from my Aperture Library were missing. The album data and everything were there, but the actual files were not. They also did not exist anywhere on the Time Machine drive and as such never made it over to the new HD. Weird, I thought. They were there, clear as day on my original drive. They simply weren't backed up.
Now I'm aware of a few TM niggles, such as the false backups after verifying a disk, but I hadn't done that.
The second issue was much more major. My Wife's MB would be endlessly stuck on the white boot screen with the grey Apple logo. As it turns out, it's exactly this issue here:
In short, the fresh Time Machine backups I made before transferring to the new HD showed no sign of updating the /System/Library/Framework/Security.framework/Versions/A/Security package, which is REQUIRED for the Mac to boot into 10.6.7 (it had an old one from before).
Great, I thought, but maybe I can fix that by installing a fresh 10.6.7 combo update on the MB via target disk mode.
No dice. On trying, it goes all the way to the end, and then fails installation. I had to resort to copying over the correct, more recent security package just to get it to boot.
After booting, what to do? Who knows what other files Time Machine failed to update, and what consequences they would have. After putting back the original security package, I tried updating 10.6.7 again. Nope, no dmgs would open - i HAD to use the new Security package for anything to open. Fair enough, but even with that, the installation would inevitably fail.
Problem with the package? Nope. Tried a fresh download, and checked the SHA and everything.
Time to do some blitzing. I pulled out my trusty Snow Leopard DVD and did a reinstall on top. That's gotta get my problem, right? Well, nope. After resetting to 10.6.0, the 10.6.7 combo updater STILL failed on installation. Furthermore, the updater no longer worked on MY MBP either.
As it turns out, it was related to this:
In short, some files had the user immutable flag switched on, preventing changes from being made to those files (manifests as a little lock icon on the file icon). They included (and I'm sure not limited to) the Acknowledgement.rtfs in /Library/Documentation/, as well as a majority of the fonts in /Library/Fonts.
Checking back in the backup drives, it was clear that Time Machine was the culprit - instances of those files in the backups were also locked. When did that happen? Looking back, it looks like it happened when I transferred the backups from one Time Machine drive to another. But it wasn't all at once - in the first backup on one drive, one of the Acknowledgement.rtf files was locked, and the other one wasn't, but in the second onwards, both were. It was clear that Time Machine seemed to be doing it to those files. Which files and why? I have no idea.
So removing the uchg flag with "sudo chflags -R nouchg /" in terminal finally allowed me to apply the 10.6.7 combo update without failure.
So were the troubles over then?
While checking if everything was fine, I noticed iPhoto on the MB had all the thumbs missing - after rebuilding, they weren't back, and only a .plist trashing fixed it (I consider this pretty normal - probably looking for the files on the old UUID drive or something).
But what gives? ALL the photos taken on the trip were gone! Not just the thumbs - the actual files were missing from the iPhoto Library! The data in the albums existed, just the actual files, just like my instance in Aperture on my own MBP.
Checked the Time Machine - again, it was clear Time Machine had completely stuffed up - the files were nowhere to be found on the Time Machine drive.
So currently, I've returned the original internal drive to the MacBook, performing a FRESH on new reformatted disk Time MAchine, and will use THAT to restore.
Nightmares, indeed. It's several days of work doing all the restores, considering I have limited drives to work with. And yes, rest-assured, I was doing enough permission repairs, and PRAM resets to ensure they weren't issues.
It occurs to me there are several faults with the most recent version of Time Machine (maybe 10.6.6 or something as that's when people had some of the issues above):
1) At some point in time, Time Machine may not update a necessary Security package (and probably other files too - I believe the files around it were also not updated), meaning that if you use that Time Machine to restore, the outdated package will cause your computer to fail to boot.
2) Transferring your backups to a new destination Time Machine drive may cause certain files to become user immutable or 'locked', with one consequence being you cannot update the OS.
3) Time Machine may fail to backup image files with the Aperture or iPhoto Library. Trying to remember back, I *think* this may be related to the fact that we changed time zones, as the unupdated image files were after the zones were changed. Strangely, every other file within the Library packages were updated, as album data was updated - just not the actual image files and folders.
Conclusion? I no longer trust Time Machine. The basic foundation of a backup service is that you trust it to do what it's supposed to do. After all this, how can I?
You might think they are isolated incidents, but they were occurring on two Macs that I have, and they same errors can be found in others.I think I have detailed some root causes, but who really knows.
At any rate you should keep an eye on at least these files I have detailed. Would love to hear Pondini on the matter, as I know he knows a lot about Time Machine.