9

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?

  • Just FYI: I'm using OS X Yosemite 10.10.3 and the current firmware on my Synology NAS. – michael May 3 '15 at 9:08
2

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.

  • Excatly what I did: I started with a new Time Machine Backup. Thanks for answering though! – michael Aug 28 '17 at 17:37
  • TimeMachine has a setting to set a Maxsize for the sparsebundle, but in my experience this only works for new sparsebundles, not existing ones. The only solution to his problem is to delete old backups and my solution is the best way to do that. – Robert Barrueco Mar 11 at 21:17
  • Agreed - should I bold the but only when you make the container or change that to be more clear @RobertBarrueco – bmike Mar 11 at 22:49
1

This is the easiest solution using OSX Terminal.

Get a list of all the backups in TimeMachine. This will also show you the full directory path to the backups that you will need in step 2...

$ tmutil listbackups

/Volumes/Time Machine Backups/Backups.backupdb/{your-macbook}/2018-10-02-213405
/Volumes/Time Machine Backups/Backups.backupdb/{your-macbook}/2018-10-09-192323
/Volumes/Time Machine Backups/Backups.backupdb/{your-macbook}/2018-10-19-212659

Choose which backups to delete based on their date. Note the use of a wildcard * and the use of the directory from step 1. For example, to delete all of 2018's backups you would use this:

$sudo tmutil delete '/Volumes/Time Machine Backups/Backups.backupdb/{your-macbook}/2018-'*

The final step is to shrink and recover space from the sparse bundle. Search your backup drive for the .sparsebundle file.

$ sudo hdiutil compact '/Volumes/{your-mac}.sparsebundle'

  • How does this automatically shrink the backup to a specific size as the OP asked for? – nohillside Mar 11 at 15:04
0

Shrink the backup volume to the desired size. Time Machine is designed to keep adding backups until the volume is full, then prune older copies. It is NOT designed to share storage space with other things, nor to leave X gigabytes free on the destination.

  • 5
    Well, I can't shrink the volume, because it already takes more space than wanted. That's my problem. – michael May 3 '15 at 15:24
  • 1
    how would you shrink the volume? – jmh Jul 24 '17 at 2:31
0

I agree with the answer given earlier, though what you could try is to manually delete Time Machine backups (at your own risk).

If you mount the volume, there is a folder called "Backups.backupdb" (it may be looking slightly different on remote backups). Inside it will have your computer name and then either the dates or the volumes, or vice versa (sorry, I am currently away from my own Mac and cannot check the exact order).

If you remove some earlier date folders, you will free up some space in order to resize the volume.

NOTE: Keep in mind that Time Machine is an incremental backup using hardlinks for unchanged files. So, removing one date folder, may not remove the amount of space it states to be sized at.

  • 2
    This site says to delete your backups using sudo tmutil delete. – Harvey Mar 9 '16 at 15:14
  • Time Machine shares unchanged files by hardlink. If you delete an entire backup, files that are used by other backups are not deleted, only the links. – WGroleau Sep 11 '18 at 22:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .