Fixing corrupt Time Machine Sparsebundles

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.

Review: Jungle Disk Plus 2.0

I’ve been on a quest for the perfect off-site backup service. I’ve considered everything using my own servers and rsync, tried various free/cheap services like Carbonite and AT&T Remote Vault, and finally came across Jungle Disk. Jungle Disk uses Amazon S3 for storage, and Amazon EC2 for their Plus service. This review is of the backup features, and does not cover the flagship virtual drive features.

Licensing: Generous! Pricing: Cheap!

First, the bottom line. The software is a $20 purchase, and that’s good for lifetime updates and unlimited installs that share a single S3 account. They do not mark up Amazon’s pricing, so storage (as of 7/15/08) costs $0.15/GB, transfer in costs $0.10/GB in and $0.17/GB out. So, if we backed up a 100GB drive, based only on transfer and storage costs, we would expect a bill of about $25. Amazon has continued to adjust their S3 pricing, so we can likely expect those costs to go down over time.

Plus Service
Jungle Disk’s Plus Service is indispensable for doing backups. The ability to do block-level updates and upload resume are both key to cutting down bandwidth costs. And, at $1/month, it seems to be a no brainer.

Backup
Jungle Disk has built-in backup features, which are what I’ve been using. First, we’ll cover the down sides: Jungle Disk has to be running for backups to occur. It will wake your computer from sleep, but if your user is not logged in or Jungle Disk is not running, the backup will be delayed or skipped. There are some workarounds for running it as a Windows service, none of which I found to be reliable. Also, as with any online backup service, it only goes as fast as your internet connection. There is a bandwidth schedule, so you can throttle back on upload and/or download speeds according to your usage schedules.

Everything else is rainbows and unicorns. You can create multiple backup jobs, choose the files you want to back up, set up exclusion rules and schedules. Some advanced features include optionally removing files that have been deleted on your local system, and setting up rules for keeping previous versions of modified files. Here’s how my backups are now configured:

Desktop: Daily backup of users directory & development directories, with a 14-version history, up to a year.
Laptop: Daily backup of users directory & development directories, with a 14-version history, up to a year.
Web Server: Hourly backups of inetpub, with a 14 version history, up to 60 days.
Database Server: Daily backups of MySQL dumps, with a 14 version history.

For my first month of backups, I am expecting a bill of around $75. Considering that this is including a first-time upload cost that I won’t have in subsequent months, it’s really amazing. I have many, many gigs of pictures and videos, thanks to today’s 10 megapixel cameras and HD Video files, so it’s nice to get those precious memories backed up off-site, in addition to my Time Machine backups.

Availability & Security
One truly unbelievable feature that may go unnoticed is that Jungle Disk itself is not dependent on the stability of the company. The Plus service, but the basic service is only dependent on Amazon S3. Jungle Disk actually has open-source code on their download page that includes the code needed to read your data back off of S3. This provides unparalleled levels of service, when compared to other online backup offerings. Also, if you are the extremely paranoid type, you can opt to encrypt your files before they’re sent to S3 (over http or securely over https) or soda pdf or other formats you consider safe.

Final Thoughts
I’ve been supremely impressed with Jungle Disk as an application and a service. When doing backups, CPU usage has been minimal, and on my DSL line, web and email speeds haven’t suffered much, if any. I do get some lag when gaming, but it’s easy to pause and resume backups. The ability to use this cross-platform on OS X, Windows and Linux has proven indispensable, allowing me to further reduce the number of solutions needed to maintain my home network and development projects.