Mac – Prevent Time Machine From Resizing Disk Image

backupmojavenastime-machine

I've been trying to get Time Machine to stop filling up my NAS with backups, but so far it seems determined to do-so no matter what.

Since Time Machine fails spectacularly with Linux disk quotas, using partitions isn't an option (even if my NAS let me, it's too late to set it up now), I decided to try resizing the disk image using hdiutil resize, which seems to be a common suggestion.

This did seem to work for a while, but as of today Time Machine has inexplicably decided that it knows better than me, and as such the first thing it does is immediately resize the image so that it will inevitably fill all free space on the drive.

As you can imagine this is infuriating, as I'm trying to backup multiple machines on my NAS, but it also runs a few services and other things as well, so I can't have it running out of space.

Is there some way to limit the size of Time Machine's sparse bundle, such that it won't just immediately resize it again?

Best Answer

There is a preference setting for that. All you need to do is specify, in megabytes, your desired maximum space limit. In Terminal, enter the following command and replace xxx with your desired size limit.

sudo defaults write /Library/Preferences/com.apple.TimeMachine MaxSize xxx