Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Time Machine and mounted sparse bundle disk image - file by file backup?

I think I had this system working in Leopard, but upon upgrade to Snow Leopard it seems to have broken. Does anyone have any idea how I can get Time Machine to back up the contents of a mounted sparse bundle disk image in real time - file by file within the disk image? For example, I have a 2GB sparse bundle disk image that i keep all of my bank statements/files/records in. It auto-mounts on boot and stays mounted. I use the disk image to keep it password-protected, so if I unmount it it is fairly safe. In Leopard, I would exclude the .sparseimage file from backup, but it would still backup the mounted image itself on a file-by-file basis, so I could enter Time Machine and explore the image folder by folder, file by file (say I deleted an old bank statement by mistake, I could go into time machine and recover as if it were a normal file/folder).

In Snow Leopard, after a clean install, and creating a new sparse bundle disk image and excluding the .sparsebundle file, I can't seem to get this to work even though the image is mounted. Is there any way to trick Time Machine into backing up the mounted image as it would any other folder? I know I can back up the .sparsebundle file incrementally but in order to recover a lost document I'd have to remount the old bundle and that seems rather roundabout.

Thanks,

24" 2.4GHz Intel iMac, Mac OS X (10.6.1)

Posted on Sep 18, 2009 11:37 AM

Reply
20 replies

Nov 9, 2009 4:29 PM in response to JimBlake

Well......now that I try it with a new disk image in Snow Leopard, I can't get it to work either! However, my legacy image (originally created and backed up using Leopard) works fine.

I've read in other postings that Snow Leopard just "does it this way..." It appears that Apple may be relying on the sparsebundle to handle incremental backups at the image level, vice allowing you to do it at the file level in the mounted volume - it's a shame. I'm glad my legacy image works, but I'd like to be able to create new ones.

10.6.2 just came out today. Maybe there's a "fix"

Pete

Nov 18, 2009 8:21 PM in response to Peter Nardi

I've given up on getting Time Machine to do this for me and I've gone to my Plan B. For what it's worth, here it is.
I've created an encrypted sparsebundle on my backup drive (same physical drive as Time Machine uses) and I schedule ChronoSync to do a file-by-file backup of my local encrypted sparse bundle every two hours. I use an AppleScript to mount the backup sparsebundle before ChronoSync runs. That script has the backup sparsebundle's password in it, so I have to keep it in the local encrypted sparsebundle. Another AppleScript ejects the drive after ChronoSync finishes.
It's been working fine for the last couple of days.

Nov 19, 2009 7:53 PM in response to JimBlake

Sounds like a good approach.

I tried a few other things in Disk Utility (journaled/non-journaled images; GUID/non-GUID partition maps) with no luck. I poked around in the com.apple.TimeMachine.plist file. There are a few keys in there that look like they might affect this. Specifically, "IncludeByPath" and "IncludedVolumes." The values for the "IncludedVolumes" key are in hex; it's getting late and I didn't have the energy to try messing with them.

Maybe an answer will come up.

Pete

Nov 25, 2009 11:40 AM in response to bgwynne

I think you're trying to bypass the finder to mount the disk. Try this (I'll bold the key steps):

- *Turn off Time Machine* in the System Preferences.

- Option A: If you directly use a hard disk (not wireless) that has the sparsebundle you want to open, *connect the disk* but don't double click on the sparsebundle.

- Option B: If you are using wireless, this means use shift-command-k (or shift-apple-k), and if it says "Connect As..." in the upper right instead of disconnect, then use that button to *connect to that wireless drive*.

- Confirm the sparsebundle shows in that folder before proceeding...

- *Open Terminal* (Applications>Utilities>Terminal.app)

- Type: *hdiutil attach -noverify* (<-- notice a *space " "* must be included after typing this here but *DON'T hit return* yet.)

- *Drag the sparsebundle to the cursor in terminal*, and it should fill in something like /Volumes/HardDrive/COMPUTERNAME.sparsebundle for you. Now you can hit return, and the disk will mount.

- After you are done browsing sparsebundle's mounted image, *eject the mounted disk* like you would any other disk (not the sparsebundle image itself, just the disk icon that appeared if you successfully mounted it).

- Turn *Time Machine back on* in the System Preferences.

Hope this helps.

Nov 25, 2009 12:08 PM in response to yschutzer

I think you misunderstood the objective here. We are trying to get Time Machine to look inside a local mounted sparsebundle (or a dmg for that matter) and do a file-by-file backup. You're instructions don't seem to address that.
BTW, I was able to confirm that Time Machine under Leopard does see the mounted sparsebundle as a disk and by removing it from Time Machine's Excluded list it will do a file-by-file backup. This functionality has disappeared in Snow Leopard.

Nov 25, 2009 12:17 PM in response to yschutzer

yschutzer,

Great explanation of how to mount the sparsebundles that TM creates, but the OP is trying to get TM to back up the files from a different, already-mounted sparsebundle.

I would settle for getting TM to "see" the changes reflected in a sparsebundle file and back them up incrementally. As it stands, when TM backs up a mounted .sparsebundle file, it doesn't consistently reflect the changes since that sparsebundle was mounted. If I unmount it before backing up, it can later be restored with the proper contents.

Any fixes or workarounds would certainly be appreciated.

Time Machine and mounted sparse bundle disk image - file by file backup?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.