#Snapshot schedule

1 messages · Page 1 of 1 (latest)

viral flame
#

Quick question: Is it possible to create a snapshot schedule which keeps 2 hourly snapshots on weekdays for 2 days (24 in total) and also in the weekend, but we like to have the Thursday and Friday available on Monday? So always two weekdays of retention.

open igloo
#

I have so many questions...

  • Do you want to create "2-hourly" snapshots? So every two hours a new snapshot?
  • Do you also want to create these snapshots on Sat & Sun?
  • If you would check the system at Sun ~23:00 - what do you want to see?
  • 24x snapshots? (12x from Sun, 12x from Sat)
  • 24x snapshots? (12x from Fri, 12x from Thu)
  • 48x snapshots? (12x from Sun, 12x from Sat, 12x from Fri, 12x from Thu)
open igloo
#

ok, I don't see any way to do this natively... you need to script it

open igloo
#

hmmm... if you only want to create snapshots during weekdays it's actually quite simple:

job schedule cron create -name weekdays -dayofweek Monday,Tuesday,Wednesday,Thursday,Friday -hour 0,2,4,6,8,10,12,14,16,18,20,22 -minute 0
snapshot policy create -policy my_policy -enabled true -schedule1 weekdays -count1 24
#

If you also want snapshots being created during weekend you would need to add an additional schedule for Sat & Sun. But these snapshots would be kept the whole week until new snapshots are being created the next weekend.
So maybe create a script which deletes all the weekend snapshots on Tue 23:59. Or maybe even delete 1x weekend-snapshot every hour starting on Mon 00:05 until Tue 22:05. 😵‍💫

viral flame
#

Hi @open igloo
Same here. Customer is thinking about it now.
i already said that it could be done with an external scheduler / application, but not easily native.

#

Thanks for your input! We went for a two hour schedule each day (7 days) with 8 days retention. so maximum 8*12: 96 snapshots.

vivid river
#

You know...you can do up to 5 different schedules in a snapshot policy. You could do one policy for mon-thurs, taking a SnapShot every 2 hours and keeping 24 then have a different schedule that runs thurs-sun but keeps 36.

Downside is the thurs-sun will stick around until the next thurs-sun.

Something like this:

`cron create mon-fri -cluster cluster1 -vserver cluster1 -hour 0,2,4,6,8,10,12,14,16,18,20,22 -minute 7 -dayofweek mon..thursday

cron create long-weekend -cluster cluster1 -vserver cluster1 -hour 0,2,4,6,8,10,12,14,16,18,20,22 -minute 9 -dayofweek thursday..sunday

snapshot policy create -policy discord -enabled true -schedule1 mon-fri -count1 24 -prefix1 weekday -schedule2 long-weekend -count2 36 -prefix2 weekend
`

viral folio
#

This is great.

#

We should capture this in a KB.

#

Can someone send me an e-mail with these details? first name dot last name at netapp

#

I don't know if spammers can see this or not...

viral flame
#

Will write you an email Paul!