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 | , , , , ,

  • Craig Henderson

    Quick question about removing the sparsebundle file: I assume that the next backup will work and that all of my old backups are also there, correct?

    Thanks for the best article on this issue that I have seen.

    –craig

    • Steve

      When you delete your sparesebundle, you actually remove all the Time Machine history meaning you are starting fresh and all of your old backup will be gone. The next time Time Machine will start a backup, it will make a fresh and full backup of your hard drive. If you usually backup via Airport (Wifi), you might want to connect your MacBook to the ethernet port of your Time Capsule for this one.

      • Law

        Hi Steve. I have been trying to find a solution to a problem I created for myself relating to the sparsbundle file. I am very new to Mac’s and so far so good… ish. I have bought Airport Express, Apple TV and a 2 TB Time Capsule. I used Time Machine to start backing up but i decided to start again. I deleted the sparsbundle file and now, Time Machine wont back up because it cant find the sparsbundle file… Any ideas?
        Many thanks

        • Steve

          Hello and thanks for reading my blog.

          You might want to follow those steps:
          1. turn off Time Machine
          2. reset your backup disk by selecting “None”
          3. close the control panel
          4. open it again
          5. turn on Time Machine
          6. select again your Time Capsule as your disk.

          This should totally reset your Time Machine and you should be able to backup your Mac again.

          • Law

            Hi, Thanks for your prompt response.

            I went into time machine from system preferences and turned it off.

            I clicked on my data back up disk and selected remove.

            I unplugged my Time Capsule and even restarted my mac.

            After turning on Time Machine again and selecting my time capsule it failed again returning this message,

            “The backup disk image “/Volumes/Data/My MacBook Pro.sparsebundle” could not be accessed (error -1).”

            Right now at a loss. reading through your posts and some other sources, people are trying to find ways to delete the sparse file… I just wanna try and back up and worry about the sparse file in two TB’s time

          • Steve

            It seems that your sparsebundle file has not been totally erased or something like that.

            Maybe try to select a different disk to force reset Time Machine then select back your Time Capsule.

            If this do not help, try the software Back In Time. It’s a TM utility that could be handy to reset your Time Machine.

  • Mick Sanders

    Thanks a million for this info. After erasing my hard disk and reinstalling ML 10.8.3 I was unable to either delete the old sparsebundle or start a new one, despite renaming the computer. Once I deleted the old bundle using terminal all started working again.

  • Eryc

    Huge help! I’ve been having trouble with this for months and your fix did the trick! Thank you!

  • Natraj Sitaram

    Hi: I am having a similar problem. Tried to reduce the size of my TC and attempted deleting the sparsebundle and the bands but for some reason must have hit copy and so my desktop was flooded by 30.000+files freezing the finder. Am trying to now laboriously clean the desktop of my iMAC 27″ computer from a networked mac air I tried your method of using the terminal but no luck., Any otgher ideas? Please help!
    Natraj


%d bloggers like this: