I am warming up to Mac OS X sparse disk image bundles: This is a virtual file system stored as a collection of small (up to 8MB) files in a folder. This way, you can have encrypted HFS+ volumes stored on FAT-formatted USB drives, or SMB network shares. And because the data is broken up into 8MB chunks, incremental backups work very well by just copying the updated fragments. No problem for rsync or Time Machine, even for encrypted data.

But even though this format seems to have been designed with compatibility with non-Mac tools and file systems in mind, it does not seem to work for example with Dropbox. Why is that? Is it just some meta data ("bundle flag?") that gets lost in transfer (and that I could manually put back in)?

The Internet is also full of horror stories of corrupted bundles on Apple's own Time Capsule network backup device.

How do these bundles get corrupted and what are my recovery options?

  • Apple has sparsimages and sparse bundles. It's the sparse bundles that are broken up into small pieces as you describe. What problems are you having with Dropbox? If it is excessive syncing, you are probably using a sparseimage, which will need to sync the whole image when its contents change. – Richard Hoskins Nov 2 '09 at 3:44
  • @Richard: So far, I have no problems with Dropbox, but I read complaints on the forums that got me worried. From what I have gathered so far, all metadata and resource forks are lost on Dropbox, which should not be a problem for disk images (of any type). Also, the bundle bit got lost, so the sparse bundle was not recognized as such. This is maybe fixed by Dropbox now, and it can also be restored with a commandline tool. – Thilo Nov 2 '09 at 4:42

As far as I know, you can mount the .sparseimage, and run "Repair/Verify" in Disk Utility, like you could on any other disk....

And like any other disk, always try to "eject" or dismount before powering off or restarting the computer..

I have seen them get corrupted before, but not for a long time... I think it might have been a non-Snow Leopard issue. BTW, sparse "disks" are how Apple stores your "Home" folder when you use FileVault (which are gone in Lion, so don't go ecrypting your home folder, now... they just encrypt the whole disk)

My favorite command is the following, which shrinks the sparseimage down to the actual amount of data you have stored in it, no matter how large it had grown to by adding files which you have now deleted..

hdiutil compact /Macintosh\ HD/Path/to/Name\ of\ file.sparseimage

BTW, the backslashes ( \ ) are only required if you have spaces in your file pathname.

  • "which are gone in Lion". What? I am using File Vault now. Any links to what happens in Lion and how to migrate? – Thilo May 3 '11 at 23:29
  • 1
    I am under NDA, but take a look here.. Basically, if you are currently using FileVault, you will need to TURN OFF FV before upgrading. Keep in mind this requires the equivalent amount of free space on your Hard Disk AS the current size of your entire encrypted home directory so that the "Turning off" process has somewhere to stash your stuff while it unencrypts, then subsequently deletes the sparseimage that had previously housed your FileVaulted "Home". – mralexgray May 19 '11 at 17:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.