Periodic Snapshot Tasks - Changing their schedule

Status
Not open for further replies.

Scharbag

Guru
Joined
Feb 1, 2012
Messages
620
I have a quick question about changing a snapshot schedule. I changed the retention time from 3 months to 1 week for one of the tasks that has been running for over 1 year. Will the snapshot manager automatically remove the old snapshots (older than 1 week) or is that something that I will need to do manually?

Thank you for the help.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
The snapshots that already exist will expire at the time they were set to when they were created. That's covered in the manual. ;)

Manually removing them is a personal choice, and if you are really trying to recover space, you can surely delete them.
 

Scharbag

Guru
Joined
Feb 1, 2012
Messages
620
Thanks, I was confused as to what would be the expiration time, the old schedule or the new schedule i.e. would a whole buch of snapshots be deleted right away or not. Space is not an issue so I will just let them flush out as scheduled.

FreeNAS is the shiznit! 9.2.1.2 installed this AM with no issues. Thanks to all the FreeNAS folks for being awesome.

Cheers,
 

thewiep

Dabbler
Joined
Jun 12, 2011
Messages
31
The snapshots that already exist will expire at the time they were set to when they were created. That's covered in the manual. ;)

Manually removing them is a personal choice, and if you are really trying to recover space, you can surely delete them.


Can we manually change the lifetime of taken snapshots?
Say we have 10 snapshots with a lifetime of 2 weeks, we then change the Periodic Snapshot lifetime to 2 years and would like the older ones to stay for 2 years too.

I can't seem to find how FreeNAS determines when to delete, I only see a link in the snapshot name.
I read some stuff on ZFS Hold but there seem to be no holds on the periodics snapshots.

I didn't post this in a new thread as it seemed somewhat as a follow up questions.. :)
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
No you can't change a snapshot lifetime after its been made. Snapshots get their expiration date at snapshot creation.

There's a bunch of criteria that snapshots are put through before being deleted. For example, if you have a replication task for the snapshots that has failed for a week and you have the snapshots set to expire at 5 days they shouldn't auto-delete until they've actually replicated.

All things "working correctly" the snapshots should be automatically deleting at their expiration date.
 

thewiep

Dabbler
Joined
Jun 12, 2011
Messages
31
No you can't change a snapshot lifetime after its been made. Snapshots get their expiration date at snapshot creation.
Thanks for the clear info!
Although I was hoping to hear there was some possibility to get around this :)
This seems one of the first "disadvantages" of ZFS I found for my use.
The clever people who created ZFS know what they were doing so they will have their reasons for designing it like this.
This just means I have to re-think the way I snapshot now :)
 
Status
Not open for further replies.
Top