The best way to skinny your native Time Machine Snapshots on macOS Excessive Sierra

The best way to skinny your native Time Machine Snapshots on macOS Excessive Sierra


Spoiler: I went from ~50 GBs free to ~277 GBs free, about 227 GBs distinction, over the course of this reply.

There’s not a tonne of knowledge from the fundamental tmutil operate however you may name man tmutil to get extra particulars, particularly on thinlocalsnapshots:

thinlocalsnapshots mount_point [purge_amount] [urgency]
             Skinny native Time Machine snapshots for the desired quantity.

             When purge_amount and urgency are specified, tmutil will try (with urgency stage 1-4) to reclaim purge_amount in bytes by thinning snapshots.

             If urgency will not be specified, the default urgency shall be used.

A noticeable omission is what the default urgency truly is and whether or not 1 is excessive urgency or 4 is excessive urgency.

To point out you what is occurring in real-world utilization, right here is my beginning record of native snapshots:

$ tmutil listlocalsnapshots /
com.apple.TimeMachine.2017-12-14-173102
com.apple.TimeMachine.2017-12-14-212356
com.apple.TimeMachine.2017-12-15-052254
com.apple.TimeMachine.2017-12-15-084940
com.apple.TimeMachine.2017-12-15-094508
com.apple.TimeMachine.2017-12-15-121635

When working with out the purge_amount and urgency choices, it is probably that no native snapshots shall be purged:

$ tmutil thinlocalsnapshots /
Thinned native snapshots:

With purge_amount set to 1000000000 (1 Gigabyte):

$ tmutil thinlocalsnapshots / 1000000000
Thinned native snapshots:
2017-12-14-173102

And if I run that once more:

$ tmutil thinlocalsnapshots / 1000000000
Thinned native snapshots:
2017-12-14-212356

This is what’s occurred to my native snapshots record:

$ tmutil listlocalsnapshots /
com.apple.TimeMachine.2017-12-15-052254
com.apple.TimeMachine.2017-12-15-084940
com.apple.TimeMachine.2017-12-15-094508
com.apple.TimeMachine.2017-12-15-121635

Let’s strive working that very same command another time:

$ tmutil thinlocalsnapshots / 1000000000
Thinned native snapshots:
2017-12-15-052254
2017-12-15-084940

$ tmutil listlocalsnapshots /
com.apple.TimeMachine.2017-12-15-094508
com.apple.TimeMachine.2017-12-15-121635

And once more:

$ tmutil thinlocalsnapshots / 1000000000
Thinned native snapshots:
2017-12-15-094508

$ tmutil listlocalsnapshots /
com.apple.TimeMachine.2017-12-15-121635

And as soon as extra to try to take away that ultimate native snapshot:

$ tmutil thinlocalsnapshots / 1000000000
Thinned native snapshots:

$ tmutil listlocalsnapshots /
com.apple.TimeMachine.2017-12-15-121635

You possibly can see it did not do something this time.

Let’s strive rising the bytes to 10 GBs:

$ tmutil thinlocalsnapshots / 10000000000
Thinned native snapshots:

Nonetheless nothing. Let’s strive 100 GBs:

$ tmutil thinlocalsnapshots / 100000000000
Thinned native snapshots:

Once more, nothing.

So, when it will get to the final native snapshot, it should have to do with the urgency choice moderately than the purge_amount.

Let’s return to only 1 GB for the purge_amount however strive with urgency set to 1 (one other omission within the handbook is whether or not 1 is excessive or 4 or excessive, however @Clete2 and @orkoden assume 4 is excessive):

$ tmutil thinlocalsnapshots / 1000000000 1
Thinned native snapshots:
2017-12-15-121635

$ tmutil listlocalsnapshots /
com.apple.TimeMachine.2017-12-15-121635 (dataless)

Success!

You possibly can see that it thinned the final remaining native snapshot and now while you listlocalsnapshots you will see solely the most recent one however it’s tagged as (dataless).

I am prepared to guess that urgency being set to 1 means “meh, each time” and urgency set to 4 means “very pressing”.

Over the course of those trials my onerous drive has gone from ~50 GBs free to ~277 GBs free. A liberating up of about 227 GBs!

I’d assume that these native snapshots would get thinned mechanically, particularly when extra area is required so that you should not have to fret about this an excessive amount of.

However, I bumped into this as a result of:

  1. I used to be questioning how I used to be dropping all my free disk area so out of the blue, and;

  2. I used to be attempting to make a Boot Camp partition to run Home windows and I did not have sufficient area, even tho most of that area was simply being taken up by native snapshots.

Going ahead, I am questioning if I ought to have a cron job run a thinning command each week or so, simply to maintain issues clear. I will see what occurs after just a few extra days and add something again right here that I discover.

Right here is the Apple web site for extra details about how Time Machine’s Native Snapshots are used:

https://help.apple.com/en-ca/HT204015

Leave a Reply

Your email address will not be published. Required fields are marked *