Mac – Automatically shrink existing Time Machine Backup to a fixed size

backuphard drivenastime-machine

I googled for hours to find a solution for this issue, but I couldn't find an answer that fitted for my problem.

My setup:

  • I have an iMac with a ~1TB Hard Drive
  • I'm backing it up via Time Machine to a Synology NAS DS214+ with ~2.7TB Space

My problem:

  • I forgot to set a size limit for the backup user. No my Time Machine Backup uses about 2.3TB space. That's not cool.
  • I can't set a quota to the Synology user, because it beginns to count starting zero.

What I want to do:

  • If anyhow possible I want to tell my Time Machine Backup to shrink automatically to a limit of ~1.5TB by deleting the oldest backups.
  • Then I want the sparse bundle to not get bigger anymore.

Does anyone of you see a solution? Or do I have to delete all my old backups to reach my goal?

Best Answer

Time Machine will respect a size determination - but only when you make the container. This functionality is all that Apple provides for native backup so you'd need a custom setup to do what you ask, and you can't limit things once you've started backing up to a container.

Going forward if you want to make a new restricted container, the concept isn't hard to map out though.

  • make a new container on the synology and be sure to enforce the size constraints when you start the process.

Server.app does that easily - I'm not aware of synology code that reverse engineered that feature, but would be surprised if it's not on GitHub or published somewhere public.

At that point, you could delete all backups of user folders that are large and then block by block copy the old backup data to the new destination and then inherit the backup.

You can also thin backup intervals from the command line or script this automation as well.

Lots and lots of work, but it might be worth it as a project if someone is inclined.

When I'm in your shoes, I just copy off the old "too large" backup to an offline hard drive and put it on a shelf and start over with new backups of the size you like. In 6 months or a year - wipe that old drive unless you really feel you need that older history.