This is a follow up post to this one, as I realized I am dumber than I thought when it comes to using the command line interface; so for all of you fellow stoopid users (starting with myself the next time it happens), here is a step-by-step guide derived from the excellent one by Garth Gillespie.
You know you are in trouble when you see this error message:
This means the -sparsebundle file that contains your backup is marked as “bad”. Why is that I haven’t been able to find out, and apparently nobody knows yet; it does not depend on the NAS you use (I have Synology, but I saw the exact same situation reported on a number of other brands).
On your Mac, mount the external drive that contains the .sparsebundle files, launch Terminal, and get root:
sudo su -
enter your password and then
chflags -R nouchg /Volumes/Backups/2013\ MBA\ of\ Gianni.sparsebundle
this takes a while to complete, in my case about 35 minutes; you know it has finished when it returns to the prompt. If at any point in time you want to know what’s going on, you can launch another Terminal window and use the commands:
ps -eto list the running processes,
qto finish; Garth suggests
tail -f /var/log/fsck_hfs.logto watch lines as they are added to the fsck_hfs.log file,
ctrl-Cwhen you’re done.
the .sparsebundle file path must be written using the rather arcane Terminal syntax: to find the precise path I use the excellent Pathfinder replacement for Finder, which has a very useful Copy path as > Terminal command
when it’s done, type
hdiutil attach -nomount -noverify -noautofsck /Volumes/Backups/2013\ MBA\ of\ Gianni.sparsebundle
which will result in:
at this point, if needed, FSCK is running already, and the file tail will show something like this over some time (couple of hours, but maybe more):
Now we can go back to Garth’s guide; type
hdiutil detach /dev/disk3s2
When complete, you need to edit an plist file within the sparsebundle that records the state of the backup. On the top level of the sparsebundle find a file called com.apple.TimeMachine.MachineID.plist. Edit it and remove these two nodes:
Finally you want to change
Now you can eject the network share and have Time Machine give it another go. After the (long) verification step, backups should proceed once again.