Continuing from my Timemachine post, here is my summary of instructions from Garth Gillespie’s site (garth.org).
In Terminal:
sudo su -
The verication that has already run has marked your sparsebundle as bad, so first we need to make it look normal:
chflags -R nouchg /Volumes/{name of your network share}/{name of}.sparsebundle
This may take a little while. Then:
hdiutil attach -nomount -noverify -noautofsck /Volumes/{name of your network share/{name of}.sparsebundle
You will then see something like
/dev/diskx Apple_partition_scheme /dev/diskxs1 Apple_partition_map /dev/diskxs2 Apple_HFSX
Where x is the disk id for the external disk. You are interested in the one labeled Apple_HFSX or Apple_HFS. It might be 2, 3, 4 or higher.
At this point, the filesystem check is running. To see what’s going on, tail the fsck_hfs.log
tail -f /var/log/fsck_hfs.log
Normally, if fsck is running, it will successfully repair the sparsebundle, but it can take a long time (hours). Grab a coffee.
When done, you should see:
The Volume was repaired successfully
So far, this has always worked for me. But if you get:
The Volume could not be repaired
You can try:
fsck_hfs -drfy /dev/diskxs2
Make sure to replace x with whatever number your disk is from the output above. Like before, use tail to follow the fsck log output, and get comfy.
Once fsck has completed successfully, unmount the volume:
hdiutil detach /dev/diskxs2
Lastly, you need to clean up your backup’s state by editing com.apple.TimeMachine.MachineID.plist (top level of your sparsebundle) as follows:
1) Remove these two nodes:
<key>RecoveryBackupDeclinedDate</key> <date>{whatever-the-date}</date>
2) Replace:
<key>VerificationState</key>
<integer>2</integer>
with:
<key>VerificationState</key> <integer>0</integer>
And you should be good to go!
Recent Comments