Prevent Time Machine From Resizing Disk Image?

Solution 1:

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

Solution 2:

For Mac OS Catalina, as suggested by @Haravikk, I've confirmed that if you modify the disk image created by Time Machine to have a size limit and a small extra partition, Time Machine will not be able to expand the disk image.

Here are the steps:

  • Mount a network disk using AFP to be your Time Machine volume. (Use afp://yourothercomputer.local from Finder menu Go->Connect To Server)
  • In Time Machine preferences, choose this volume as your Time Machine disk
  • Wait for Time Machine to create the disk image file (ComputerName.backupbundle) and start backing up to it
  • You can now stop Time Machine (skip this backup and turn off automatic backups for now)
  • Resize the disk image to 1000GB or whatever you want: run this command in terminal:

hdiutil resize -size 1000g /Volumes/<YourTMBackupDisk>/<Computer Name>.backupbundle

  • To prevent Time Machine from resizing it again, double click on the .backupbundle file to mount it (on a Catalina machine)
  • Open Disk Utility and select the "Time Machine Backups" disk image and click the "Partition" button
  • Now you want to add a small partition by clicking the "+" and make the new Untitled partition small like 10 MB
  • Change the Untitled partition format to MS-DOS (FAT) then hit Apply
  • Once saved, eject the "Time Machine Backups" disk
  • Start time machine again and now this should work to prevent time machine from expanding

Now I have my encrypted time machine backup images limited to the size I want!