Prevent Time Machine Backup Resizing

If you are using Time Machine to backup your Mac onto a network share, you might have noticed, that since the Snow Leopard 10.6.3 update the sparsebundle image used by Time Machine has been resized to use the whole capacity of your network share.

I use a Qnap NAS as a central network storage for backing up mulitple Macs and therefore I want to define strict limits for the maximum size of each Time Machine backup. So after noticing the new image sizes, I tried to resize them with hdiutil:

hdiutil resize -size 500g MYBUNDLENAME.sparsebundle

Unfortunately Time Machine resizes the image size every time it runs, so it is necessary to prevent it from resizing the image.

The image size of a sparsebundle is stored in the Info.plist file inside the bundle directory, so I tried to remove write permissions to that file from the terminal:

cd /Volumes/MYSHARE/
chmod a-w MYBUNDLENAME.sparsebundle/Info.*

This wasn’t working either, because OSX seems to reset the permissions to Info.plist automatically.

The solution which is finally working for me was to login to my Qnap box via SSH and change the permissions there via chmod:

chmod a-w MYBUNDLENAME.sparsebundle/Info.*

Now, when Time Machine starts, it tries to resize the image but fails, as the Qnap server is preventing any changes to the Info.plist file. You can see this behavior in the system.log:

23.05.10 22:29:13	com.apple.backupd[378] Resizing backup disk image from 500.0 GB to 989.8 GB
23.05.10 22:29:13	com.apple.backupd[378] Could not resize backup disk image (DIHLResizeImage returned 35)

After this logging message, the rest of the backup runs fine. For me this is a nice workaround until there is an official way to limit the backup size.

4 thoughts on “Prevent Time Machine Backup Resizing

  1. I am using the Netgear ReadyNAS Pro Pioneer edition but i do not use it as a NAS drive, it is just connected to one computer. i do not have the same requirements as you and did not configure the workaround but i see the exact same log as in your screen grab. i would like to know why TM is prevented from resizing the backup, without my setting it that way.
    Perhaps one of you can shed some light on this.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">