ONTAP Discussions

Script that delete snapshots of volume by the number of the snapshots

HENHENHEN

Hey,

i looking for a script that will go over all my volumes and delete all of my "weekly" snapshots of each volume only if that volume has more than 6 "daily" snapshots

if i have less than 6 "daily" snapshots dont delete any snapshot from the volume

 

i need to do this on 7 mode and C-mode

 

it could save me a lot of work 

thanks for help's!!Smiley Happy

3 REPLIES 3

JGPSHNTAP

 

 

Also, are you familiar with the powershell toolkit.  This is something that you need to work on to get started.  

 

How many controllers are we talking about and about how many volumes?

 

HENHENHEN

yes,

i already manage my script 🙂

thanks anyway!

CASTROJSEC

Could you not just configure the snapshot retention period for each volume using system manager?  In CDOT you would just create a SnapShot Policy and assign the volumes to it.  In 7 mode just use set the retention to 6 daily and 1 weekly.  You would not have to run a script everyday for this.  If you have a lot of them you could use powershell to assign a policy to all of the or DFM "Run Command".

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public