Cowell Computer Consulting

How to fix failing time machine backups due to a corrupt disk image

Posted by Luke Cowell on April 02, 2010 at 05:05 PM

I do time machine backups through a USB disk attached to my Airport Extreme unit. Over time the disk image that I'm backing up to seems to become corrupt. Time Machine requires that if you're backing up to a disk image that it was unmounted cleanly or it pass a fsck before it will mount the image and use if for a backup.

The simplest solution is to start backing up to a new disk image, but this doesn't give you the same access to all your previous backups.

Here are the steps I took to fix the disk image, so I can continue backing up to the same image.

Mount the disk image in read write and do not mount the volume

hdiutil attach -noautofsck -nomount -readwrite location_of_your_image.sparsebundle

When you mount, fsck might be called on the image, but you want to kill that process.

Get the info about your attached disk image here:

hdiutil info

Call this fsck command and put your device number in place of the one I have here.

fsck_hfs -rfy /dev/disk1s2

-r means to rebuild that catalog btree (more options can be found in the fsck_hfs man page.

You may need to run this a couple of times before the image is marked as clean.

Tags: (none)
Hierarchy: previous, next