Keep APFS snapshots

Is there any possibility to keep my APFS-snapshots?


If I create a snapsot using

tmutil localsnapshot /

it gets deleted after some inpredictable time (few hours to immediately).

Is there any way to disable this behaviour or to mark snapshots as "persistent" (system-calls are OK too)?

Because without something like this snapshots are completely useless...

Accepted Reply

Time Machine should only monkey with its own snapshots. If you create a snapshot via other means, Time Machine should leave it alone.

As far as creating such a snapshot, that requires a special entitlement as per this thread.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Replies

Time Machine should only monkey with its own snapshots. If you create a snapshot via other means, Time Machine should leave it alone.

As far as creating such a snapshot, that requires a special entitlement as per this thread.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

I think what K Biermann is refering to, are the Time Machine snapshots, not the snapshot apis for third parties. My experience has been the same. The time machine snapshots last only for around 24 hours.


According to the support article https://support.apple.com/en-hk/HT204015


"

  • A daily snapshot is saved every 24 hours, beginning from the time you start or restart your computer.
  • A weekly snapshot is saved every week.
  • Starting with macOS High Sierra, an additional snapsnot is saved before installing any macOS update."

This doesnt happen with my snapshots, or with any other High Sierra mac I have checked.


At most there are snapshots for the past day. So no daily snapshots beyond 24 hours, absolutely no weekly snapshots either. This renders the feature much lesss useful for me.


I would like to understand why time machine is so aggresive in deleting old snapshots, even when huge amounts of drive space are available.

I think what K Biermann is refering to, are the Time Machine snapshots, not the snapshot apis for third parties.

I can’t really speak to the behaviour of Time Machine, which is more of a user level thing than an API level thing.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"