I use Time Machine on my MacBooks as part of my backup plan. However, it backs up over the wireless network to an external USB drive on my Mac Pro, and occasionally there are problems. A couple times now, I’ve gotten an error where Time Machine says it cannot back up because the drive is read only. When you look through the logs, you see that the drive is read only because the sparsebundle is corrupt.

I tried running Disk Utility on the image, but it fails out with an “Invalid Sibling” error. Upon further research, I found this:

http://blog.jthon.com/?p=31

Here’s an overview of the steps:

Turn off Time Machine!

Next, you must attach the sparsebundle without mounting it.

hdiutil attach -nomount -readwrite Bhaal_0011247e3338.sparsebundle

This process took quite awhile for my 200GB image. Next, We need to run fsck_hfs on the sparsebundle. You will want to replace “disk1s2″ with the disk number in the result of hdiutil.

fsck_hfs -rf /dev/disk1s2

Now, fsck_hfs took FOREVER. Literally around 24 hours. But, when all was said and done, it all worked again, and it sure beat having to start the backup over on my MacBook.

Help make me popular:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Pownce
  • Slashdot
  • StumbleUpon
  • Technorati
  • TwitThis

This entry was posted on Thursday, January 22nd, 2009 at 11:48 am and is filed under General. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

3 Responses to “Fixing corrupt Time Machine Sparsebundles”

  1. B on April 6th, 2010 at 10:27 am

    Why not run Disk Utility on the sparsebundle ( I mention this because I am mounting the Time Capsule, and accessing the sparsebundle that way. Tbs, I have no idea if it’s the ‘right’ way or not) by mounting the Time Capsule?

  2. Shan on May 29th, 2010 at 5:57 pm

    Disk Utility wasn’t working.

  3. Boot See on July 24th, 2011 at 12:19 pm

    It could be that it is not read the real disk image from the REAL TimeMachine Drive.
    It happens often that you lose connection to the drive, but OS X /Volumes/… folder still has the disk label as mounted, and there is a fake listing of the drive and all the directories and files that you actually opened while the drive was last mounted.

    The best option is to restart the computer and NOT mount or connect the AIRPORT or mount the drive, and recheck the folder /Volumes/ to see if the TIMEMACHINE drive is still mounted. If it is not, reconnect and try.

    If you are like me, you will not have to REBUILD a new backup, as I ignorantly did the last time, and learn from my mistake. I lost a whole a drive that was backed up… and when the Sparsebundle seemed corrupt, I deleted and started over, this time without my 250 gig iTunes Music Library.

    Hope that helps everyone.

Leave a Reply