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.
Exact same problem here. Time Machine no longer recognizes the contents of a mounted sparse disk image. The mounted sparse image also is not recognized by Time Machine as a source to ignore. Used to work perfectly in 10.5
Looks like you're correct about the new behavior for sparse images, but regular images still work fine. You can exclude the .dmg file, but have Time Machine back up the associated mounted volume. Not as efficient in terms of using disk space, but it works.
I've tried this with a regular dmg, a sparsebundle, and a sparseimage and I can't get Time Machine to see inside any of them when they are mounted. How did you do it Peter?
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.
Nope, 10.6.2 didn't fix it. I went to the local Genius Bar today, but he had no idea either. He said he would research it further and email me tomorrow.
I like having it back up at the file level, so I can recover individual files if needed instead of having to restore the entire bundle. I also worry that if the sparse image bundle gets corrupted, I lose it all, but if I have a "by-file" Time Machine back up of the mounted volume on an external drive, I'll avoid that risk.
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.
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.
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...
- 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.
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.
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.