How can I determine how long snapshots are kept for?
Applies to
- ONTAP 9
- Snapshot Policies
Answer
- The retention of snapshots created by scheduled snapshot polices is dependent on how the policy is configured.
- Using the output for the Default snapshot policy below we can see that each policy '
schedule
' is associated with a 'count
'. - This
count
indicates how many snapshots are kept for the associated schedule. - Using the hourly schedule as an example, 6 snapshots will be retained, meaning 6 hours worth of hourly snapshots will be kept.
Cluster1::> snapshot policy show
Vserver: SVM1
Number of Is
Policy Name Schedules Enabled Comment
------------------------ --------- ------- ----------------------------------
default 3 true Default policy with hourly, daily & weekly schedules.
Schedule Count Prefix SnapMirror Label
---------------------- ----- ---------------------- -------------------
hourly 6 hourly -
daily 2 daily daily
weekly 2 weekly weekly
- Note that snapshots are deleted based on the "Prefix" shown above.
- Therefore, if a snapshot is renamed and the prefix is removed, that snapshot will not be deleted per the snapshot policy "count".