OS X: Time Machine preventive maintenance
March 31, 2014 Leave a comment
It was one of those moment when many things went wrong and the only way out was to restore the entire Mac from the Time Machine backup. But, before starting the process, I ran a file system check and… surprise, the file system was broken and repairs were needed. Several hours later the file system was repaired, the install performed and the machine was up and running without any (visible) problems. But the lesson was learned: Time Machine is great, but disks need some attention.
If you are serious about backups, you probably use a network disk, and inherently a .sparsebundle to store the actual backup file system (there are many arguments in favour of network disks instead of local disks; among them is portability, you can move the .sparsebundle to any physical disk, formatted in any way, on any OS).
For my main machines I use a separate 3T disk inside a Synology DS413j server, where two .sparsebundle are stored.
Since the health of the physical disk is handled brilliantly by the Synology (periodic SMART tests), and the health of the file system where the .smartbundles are stored (probably an journaled EXT3) is also under Synology responsibility, only the health of the .sparsebundles content needs some care.
For this, you will need to use the Disk Utility.app, but before starting it, you first need to mount the .sparsebunle to the system. The recommended steps are:
- temporarily disable the Time Machine scheduling, to avoid it starting during the maintenance
- navigate the network resources and mount the network disk where the double click the .sparsebundle
- double click on the desired .sparsebundle to mount it; normally you should see mounted disk as a new resource in Finder’s Devices:
- go to Utilities and start the Disk Utility.app; select the Time Machine Backup disk and, in the First Aid tab, click the Verify Disk button.
- normally everything should be fine
- if it isn’t… keep your fingers crossed and attempt a Repair Disk (this is how I brought my other disk back to life)
- when ready, unmount the .sparsebundle (in Finder, the specific top pointing arrow at the right of the Time Machine Backups device)
- similarly unmount the network share
- restart the Time Machine scheduler
Please note that this procedure does not guarantee that when you’ll desperately need the Time Machine backup it will be there, but it just increases the likelihood of spotting and fixing problems earlier, when you are not under pressure and have enough time to make the proper decisions in case something went wrong with the backup disk.