Deleting snapshots

Status
Not open for further replies.

BlazeStar

Patron
Joined
Apr 6, 2014
Messages
383
Quick question:

I want to delete ALL SNAPSHOTS and start over from scratch (not the data, the snapshots).

Reason: My previous periodic snapshot tasks were messy, had a life that was too long, were too frequent etc.

I'm been trying to research the question but I can't find a definitive answer.

So: can I delete ALL snapshots (and also, is there a way to do it via CLI) ?


I'm using FreeNAS-9.3-STABLE-201601181840
 

jde

Explorer
Joined
Aug 1, 2015
Messages
93
From the Storage -> Snapshot menu select the "All" link at the bottom of the screen. Then:

1) click the checkbox for the first snapshot;
2) scroll down to the last snapshot;
3) hold down Shift on your keyboard;
4) click the checkbox for the last snapshot.

It may take a while, but this should select all of the snapshots. Then click the "Destroy " button at the bottom of the screen.

You can probably achieve a similar result mucking around in the CLI. Snapshots are saved in a hidden .zfs folder for each dataset. Note that the .zfs folder won't be listed by ls -a, but it is there. Personally, I wouldn't risk doing this in CLI because the risk of mistakes and/or unintended consequences are just to high. I'd hate to lose my data or my pool because I was too impatient to let the GUI populate the snapshots list.
 

BlazeStar

Patron
Joined
Apr 6, 2014
Messages
383
Okay I will proceed through the GUI, thanks!

But reading your post, I understand that there is no risk, whatsoever, of deleting ALL snapshots... right?
 

jde

Explorer
Joined
Aug 1, 2015
Messages
93
there is no risk, whatsoever, of deleting ALL snapshots... right?

I'm a lawyer, what do you expect me to say? :). You get what you pay for. No warranty express or implied!

In all seriousness though, freenas is an appliance and is designed to be administered through the GUI. You should be safe doing so. The only danger I foresee is that you later realize there was an old file in one of the snapshots you deleted that you now need. You can mitigate this danger by keeping one or a few of the existing snapshots.
 
Last edited:

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
Probably best not to delete the jail snapshots labelled 'clean'. I believe they are used as clone sources when you create additional jails.
 
Status
Not open for further replies.
Top