Is there a way to restrict Time Machine backups to a given size?

Solution 1:

You could try using the Disk Utility to make a partition of a given size, and then having Time Machine backup to that partition.

Solution 2:

From https://dongknows.com/this-trick-will-keep-time-machine-backup-storage-use-under-control/:

  • Determine the storage limit: Generally, 150% of the capacity of the Mac’s internal drive is a generous limit. Now convert that number in megabytes (MB).
  • sudo defaults write /Library/Preferences/com.apple.TimeMachine MaxSize CALCULATEDMAXSIZE

Once the backup file exceeds limited storage, old data will be deleted, so make sure you have a good choice of the limitation.

Note: according to the article, this only works up to Sierra (macOS 10.12) or earlier.