Vous êtes sur la page 1sur 2

How to create a snapshot retention policy in

clustered Data ONTAP using the CLI


Sep 29, 2016How To
Article Number
000027844
Description

Environment:
Product Model: FAS6240-R5
OS: Clustered Data ONTAP 8.2P5

This article describes the procedure that should be followed to create a retention policy for
automatically triggered snapshots in clustered Data ONTAP using the CLI.

Procedure

Perform the following steps to create a retention policy for automatically generated snapshots
from the system CLI:

1. Create a 'cron schedule' that will run at a certain time:


Example:
'job schedule cron create -name dailySnap -hour 23 -minute 0'
(creates a schedule that will be run every day at 11 p.m)
'job schedule cron create -name weeklySnap -dayofweek Sunday -minute
0' (creates a schedule that will be run every Sunday)
Note: The 'minute' flag MUST be used to create the schedule.
For more information on creating a cron schedule, see the Data ONTAP 8.2
Reference Manual.

2. Create a snapshot policy that will be assigned to a volume:


Example:
'volume snapshot policy create -policy 2days2weeks -enabled true
-schedule1 dailySnap -count1 2 -prefix1 dailySnap -schedule2
weeklySnap -count2 2 -prefix2 weeklySnap' (creates a policy that keeps two
daily snapshots and two weekly snapshots)
For more information on creating a snapshot policy, see the Data ONTAP 8.2
Reference Manual.

3. Associate the policy with a created volume:


Example:
'volume modify -volume volName -vserver vserverName -snapshot-policy
2days2weeks'
Volume volName now has a snapshot policy that will retain only two daily snapshots
and two weekly snapshots.
Note: Snapshot policies cannot be created for manually triggered snapshots.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@

Vous aimerez peut-être aussi