PDA

View Full Version : 10.6.3 TimeMachine doesn't play well with custom sparsebundles


fracai
04-09-2010, 10:10 PM
A heads up to anyone using a custom sparsebundle to limit their TimeMachine backups (as in these (http://www.macosxhints.com/article.php?story=20080519051720677) hints (http://www.macosxhints.com/article.php?story=20080420211034137)).

While this seemed to work prior to 10.6.3, this latest system update introduces a new behavior where sparsebundles are resized to equal the size of the volume on which they reside. During the first backups following my upgrade, my 250 and 500 GB disk images were each resized to around 4 TB, the thin provisioned size of my Drobo. Resizing these volumes back down to their original sizes was useless as they were sized up again during the next backup.

Check Console.app (system.log) for something like:
com.apple.backupd[###] Resizing backup disk image from 150.0 GB to 4095.6 GB

This has also been discussed on the Apple boards here (http://discussions.apple.com/thread.jspa?threadID=2382434&tstart=0) and here (http://discussions.apple.com/thread.jspa?threadID=2383738&start=0).

I've filled a bug with Apple rdar://7839823 (http://openradar.appspot.com/7839823), but it's already been marked "Behaves Correctly". Apparently, an Apple created sparsebundle could be moved to a larger drive where it should increase in size, but Mac OS X cannot currently detect this action so the "safe" operation is to always resize if possible.

It may be possible to use a standard disk image which cannot be resized, but this would defeat the magic of using a sparsebundle which only takes up as much space as it currently needs to, growing as necessary up to its set maximum.

I don't agree with this resolution and have filled a feature request (rdar://7843424 (http://openradar.appspot.com/7843424)) to introduce a sanctioned method of limiting backups. This would be a better solution anyway, as the custom sparsebundle always seemed a bit of a hack. I'll be very surprised if this isn't closed as being a duplicate request.

Apple seems to treat duplicate reports as votes though, so if you're affected by this, head on over and report it (bugreporter.apple.com).

Also, the following defaults command pops up frequently, but I haven't seen any first hand reports or evidence that it actually works, with or without the /Library/Preferences/ path.
defaults write /Library/Preferences/com.apple.TimeMachine MaxSize <size in MB? kB? b?>

biovizier
04-11-2010, 10:26 AM
While this seemed to work prior to 10.6.3, this latest system update introduces a new behavior where sparsebundles are resized to equal the size of the volume on which they reside. During the first backups following my upgrade, my 250 and 500 GB disk images were each resized to around 4 TB, the thin provisioned size of my Drobo. Resizing these volumes back down to their original sizes was useless as they were sized up again during the next backup.If you are feeling adventurous, you could try locking the sparse bundle's "Info.plist" file. If Apple hasn't thought to consider that the file my be locked and included steps for TimeMachine to unlock it, preventing modification of the "Info.plist" file may prevent the "resize" operation from acting on the sparse bundle.

I don't have 10.6, but on 10.5.8, locking the "Info.plist" file seems to prevent both the modification of the "Info.plist" file (where the bundle's maximum "size" specification is stored), and changes to the number or contents of the bands caused by 'hdiutil resize". Locking "Info.plist" does not prevent the expansion of the image through the addition of more files through normal use of the sparse bundle, nor does it prevent compaction.

Given that the sparse bundles in question contain a computer's backed up data, I personally would not recommend this type of experimental hack. However, if limiting the backup's size is an important consideration, it might be somthing to consider testing on a non-critical system...

fracai
04-11-2010, 05:08 PM
Interesting, I'll have to give that a try. Thanks for the tip.

fracai
04-11-2010, 09:40 PM
Cool, there's an additional error (13 corresponds to Permission Denied), but it appears to function correctly. All I needed to do was remove write permissions ( chmod -w ) from Info.plist (and Info.bckup).
Thanks for your help.

Starting standard backup
Attempting to mount network destination using URL: afp://user@host.local/TimeMachineDrive
Mounted network destination using URL: afp://user@host.local/TimeMachineDrive
Resizing backup disk image from 100.4 GB to 4095.6 GB
Could not resize backup disk image (DIHLResizeImage returned 13)
QUICKCHECK ONLY; FILESYSTEM CLEAN
Disk image /Volumes/TimeMachineDrive/computer_00aa11bb22cc.sparsebundle mounted at: /Volumes/Backup of computer
Backing up to: /Volumes/Backup of computer/Backups.backupdb
No pre-backup thinning needed: 100.0 MB requested (including padding), 12.49 GB available
Copied 1387 files (52.5 MB) from volume local_drive.
No pre-backup thinning needed: 100.0 MB requested (including padding), 12.44 GB available
Copied 476 files (26.5 MB) from volume local_drive.
Starting post-backup thinning
Deleted backup /Volumes/Backup of computer/Backups.backupdb/computer/2010-04-10-214435: 12.49 GB now available
Post-back up thinning complete: 1 expired backups removed
Backup completed successfully.
Ejected Time Machine disk image.
Ejected Time Machine network volume.

urbanracer34
05-02-2010, 04:37 PM
10.6.3 also hasn't been playing well with custom sparsebundles for me as well, but in a different way than mentioned before in this thread.

I have a drobo with a soft disk size limit of 4 Gigabytes, and all my back-ups on there for my 2 machines. The system I'm worried about is my iMac, which is my family's main machine. I used a program called Time Tamer from here (http://www.drobo.com/droboapps/downloads/index.php?id=16) that does the same as the first tip mentioned above in post one.

With 10.5.1-8 and 10.6.1-2, I could back up to the sparsebundle no problem, but when I upgraded to 10.6.3 on my iMac, Time Machine stopped backing up to the sparsebundle, and started backing up directly to the drobo! :eek: It's like when 10.6.3 was installed, it didn't even know it existed! Thank goodness I didn't upgrade my MacBook to 10.6 as well. :cool:

I had to move my back-up folder from my sparsebundle to the root of the drobo, which was not a easy task, in order to keep backing up and not lose my current ones. Now all the space I need to use for documents will have to be used for back-ups. :(

I hope someone here can help me with solving my problem.