Time Machine, Time Capsule and a sparsebundle file that refuse to be erased.

Time Machine, Time Capsule and a sparsebundle file that refuse to be erased.

Posted by Steve

Time Machine is a great tool that Apple provides in Mac OS X (10.5 and up) for easily backing up your system: select your computer, select the disk you want to backup to and turn it on. That’s it and your system is backed up on an hourly basis. But when something goes wrong, it is awfully hard to troubleshooting it. That’s what happened to me with my Time Capsule.

Backup with Time Capsule

Time Capsule is a powerful router coupled with a server-grade hard drive for your wi-fi and backup needs. It works perfectly with Time Machine and it’s very easy to setup. I have a latest 2TB generation and I share it between all my macs. For some weeks, Time Machine refuses to backup my main Mac Pro that I use for work claiming that the Time Capsule ran out of space. Since I haven’t made drastic changes in my disk space use, it was not clear why Time Machine couldn’t find any room for backup. And anyway, it should have clear room by deleted old backups and continue its work. It was clear that the whole backup got corrupted and had to be delete.

Time Machine, Corruption and Finder

Now, Time Machine keeps its backup on a shared disk by using a sparsebundle disk image file. This file is not really a disk image like all the other .dmg that you have met when you are downloading new software on your mac but rather a folder filled with literally thousand of small files, alias, symbolic links and more disguised as a disk image. Imagine how Finder can freak out when you ask it to remove this file. And this is exactly how my Finder freaked out. I encounter the The Spinning Beach Ball of Death and it took more than half a day to remove 200 GB from my 1.3TB sparsebundle file. I decided to put Finder out of its misery and looked for a more elegant solution.

Third party software

I gave a try at my beloved Path Finder that is a great Finder replacement (try it if you don’t already use it) but it choked on it as bad as Finder. A few forum pages later, I was advised to use Graveyard, a small freeware, that claims to be able to erase anything. And guess what? It didn’t even start to try before freezing… And then I met my first kernel panic in years… Like, really?!? A kernel panic for trying to erase what looks like a simple disk image file? You are kidding me, right?

Terminal coming to the rescue

When a GUI doesn’t do the trick, your best friend is of course the Terminal. Eh wait, where are you going? You shouldn’t be scared by the Terminal. It is true, it looks a little bit intimidating at first but when you follow the instructions, it can solve a lot of your issues. And guess what, the rm (remove) command did not help me. I was astonished, even the terminal can not remove this backup?!? Back to the forums around the internet. I read a lot of suggestions, some weird ones (using Parallel, SMB, an external PC and more…) but none really helped until I encounter a post on the Apple forums giving me the solution: the real trick was to use -Rfv after rm to let it do its magic. Here’s the full command:

cd /Volumes/<Your backup disk name>

rm -Rfv <your backup name>.sparsebundle

And voilà! 10 minutes after typing the magic command, my sparsebundle backup was gone and my TimeCapsule ready to backup my Mac Pro again.

Save this command in case your Time Machine does play tricks on you too…

Steve's Blog - Dec 21, 2012 | Misc, Tips & Odd, News
Tagged | , , , , ,

%d bloggers like this: