Removed Snapshot Task Lifetime

Fr33dan

Cadet
Joined
Apr 21, 2022
Messages
5
I have re-thought my Snapshot task strategy and gone from having a single snapshot task for my entire pool to having seperate tasks for datasets.

Some of my datasets no longer have any snapshot task for them. As of right now the snapshots for these are still taking disk space. Will the snapshots still expire and be cleared automatically when the time comes or will I have to clear them manually?
 
Joined
Oct 22, 2019
Messages
3,641
Will the snapshots still expire and be cleared automatically when the time comes or will I have to clear them manually?
As it stands now? They will not be destroyed when their "expiration" date arrives.

The reason why is because each snapshot task itself is what sets the expiration, and subsequently prunes (destroys) the "expired" snapshots. No snapshot task means no expiration means no pruning.

It (zettarepl) does not do this based on any time-stamp, metadata, or database: it strictly uses the snapshots' names, and interprets their creation time based on the parseable "date string" in the name.

Here's an example, with the important part highlighted in bold.

auto-daily-2022-03-16_0600

Zettarepl interprets this as "the snapshot was created on March 16 2022". Will be it deleted? If the existing snapshot task's configured lifespan has been exceeded, then yes.

There's also a danger in the way this is implemented in TrueNAS. See this thread for a tangential discussion, and how to keep your snapshots safe:

 
Last edited:

Fr33dan

Cadet
Joined
Apr 21, 2022
Messages
5
As it stands now? They will not be destroyed when their "expiration" date arrives.

The reason why is because each snapshot task itself is what sets the expiration, and subsequently prunes (destroys) the "expired" snapshots.

It (zettarepl) does not do this based on any time-stamp or metadata: it strictly uses the snapshots' names, and interprets their creation time based on the parseable "date string" in the name.

Here's an example, with the important part highlighted in bold.

auto-daily-2022-03-16_0600

Zettarepl interprets this as "the snapshot was created on March 16 2022". Will be it deleted? If the existing snapshot task's configured lifespan has been exceeded, then yes.
Thanks, this is kind of what I thought I just wanted confirmation before I make the effort to figure out how to remove them :smile:
 
Joined
Oct 22, 2019
Messages
3,641
Thanks, this is kind of what I thought I just wanted confirmation before I make the effort to figure out how to remove them :smile:
Just be careful if you plan on using multiple snapshot tasks for the same dataset. (See my update/edit in my above post.)
 
Top