How to Fix a Corrupted Time Machine Backup

Posted May 05, 2009 by 1How / comments 0 comments / Print / Font Size Decrease font size Increase font size

Lately your networked Time Machine drive (or Time Capsule) has stopped backing up! Maybe you've received the error message "Unable to complete backup. An error occurred while copying backup files." If you run Time Machine over a network or use a sparseimage file, then there may still be hope for your backups.

Lately your networked Time Machine drive (or Time Capsule) has stopped backing up! Maybe you've received the error message "Unable to complete backup. An error occurred while copying backup files." Perhaps you tried to mount the sparseimage and found it was corrupted.  It's just as likely that you never got an error at all, and just now noticed that your Time Machine hasn't backed up for weeks! If you run Time Machine over a network or use a sparseimage file, then there may still be hope for your backups.

Step 1. Before we need to do anything, we need to shut down time machine.  The fact that you're having this problem means time machine won't mount anyways, but that could change half way through the process. We don't want it trying to build a backup or some other crazy business while we're working on it.  Go into preferences and throw the giant switch to the left to shut it down.

Step 2. Open up Terminal and type in

hdiutil mount -nomount -readwrite /Volumes/TM/xx.sparseimage

Where /Volumes/TM/xx.spareseimage is the full path location of your sparseimage.  If you're not so familiar with the Terminal, a quick trick to get the full path is to just type in the hdiutil mount -nomount -readwrite part and then drag the image from finder into the Terminal window.

Step 3. Now that we've attached the image, we can repair it.  There are two ways to do this - Terminal and DiskWarrior.  Because not ever one has Disk Warrior we can try Terminal first.  If you do have a copy of DiskWarrior, skip this step and do the next one instead.  Assuming you don't have DiskWarrior or insist on using Terminal for some reason, let's give this a try. Enter this command:

fsck_hfs -rf /dev/disk1s2

That will attempt to rebuild the filesystem catalog.  Given that this is over a network, it could take an obscenely long amount of time to process and repair. Depending on the size of your drive we're talking several hours.

Step 4. Assuming the last step didn't work (or you skipped right to this one) fire up DiskWarrior.  Under the DIrectory option, select your backup and hit the Rebuild button.  After a bit of work on Disk Warrior's part your Time Machine backup will be restored!  Exit out of here, open preferences, and turn Time Machine back on.  If it continues with a backup, everything is fixed.  If it refuses to backup, your image is permanently corrupted and can't be fixed.  You'll have to delete it and back up all over again.

So why does this happen?

Apple still doesn't officially support third party backups, and this is often seen to be the reason why.  Essentially what's going on here is when your wireless signal drops out, there isn't enough cache on the drive and Time Machine trips on the data loss.  This corrupts your backup file.  If you use Apple's Time Capsule, there is a much larger build in cache (much much large!) so that you have a good buffer incase your signal drops out.  There's no real fix for this right now other than to buy yourself a Time Capsule, and even then the error is still possible (but far less likely).

Rate this Article:

Be the first to rate me.

  • Nothing Found!

    Why not submit your own content? Signup here.


* You must be logged in order to leave comments, please login or join us.

Comments

No comments yet.



Bookmark and Share
Sign up for our email newsletter
Name:
Email: