4.4 C
United States of America
Saturday, November 23, 2024

Find out how 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 data from the fundamental tmutil perform however you’ll be able to name man tmutil to get extra particulars, particularly on thinlocalsnapshots:

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

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

             If urgency isn't specified, the default urgency can 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 indicate you what is taking place in real-world utilization, right here is my beginning checklist 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 seemingly that no native snapshots can 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

Here is what’s occurred to my native snapshots checklist:

$ 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 yet 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 may 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 will need to have to do with the urgency possibility relatively than the purge_amount.

Let’s return to simply 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 may see that it thinned the final remaining native snapshot and now whenever you listlocalsnapshots you will see solely the most recent one however it’s tagged as (dataless).

I am keen to wager that urgency being set to 1 means “meh, every 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 might 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 immediately, 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 website for extra details about how Time Machine’s Native Snapshots are used:

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

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles