permalink | sidebar | keywords | summary |
---|---|---|---|
data-protection/create-snapshot-policy-task.html |
sidebar |
create, snapshot, policy |
A Snapshot policy specifies when to create Snapshot copies, how many copies to retain, and how to name them. For example, a system might create one Snapshot copy every day at 12:10 a.m., retain the two most recent copies, and name them “daily.timestamp.” A Snapshot policy can contain up to five job schedules. |
A Snapshot policy specifies when to create Snapshot copies, how many copies to retain, and how to name them. For example, a system might create one Snapshot copy every day at 12:10 a.m., retain the two most recent copies, and name them “daily.timestamp
.” A Snapshot policy can contain up to five job schedules.
By default, ONTAP forms the names of Snapshot copies by appending a timestamp to the job schedule name:
daily.2017-05-14_0013/ hourly.2017-05-15_1106/ daily.2017-05-15_0012/ hourly.2017-05-15_1206/ hourly.2017-05-15_1006/ hourly.2017-05-15_1306/
You can substitute a prefix for the job schedule name if you prefer.
The snapmirror-label
option is for SnapMirror replication. For more information, see Defining a rule for a policy.
You can create a Snapshot copy policy using System Manager or the ONTAP CLI. The procedure creates a Snapshot copy policy on the local cluster only.
-
Navigate to Protection > Overview and expand Local policy settings.
-
In the Add Snapshot policy window, enter the policy name, and choose the scope.
-
To select a schedule click the currently displayed schedule name, click , and choose a different schedule.
-
Enter the maximum Snapshot copies to retain, and, if needed, enter the SnapMirror label and the SnapLock retention period.
-
Click Save.
-
Create a Snapshot policy:
volume snapshot policy create -vserver <SVM> -policy <policy_name> -enabled true|false -schedule1 <schedule1_name> -count1 <copies_to_retain> -prefix1 <snapshot_prefix> -snapmirror-label1 <snapshot_label> ... -schedule5 <schedule5_name> -count5 <copies_to_retain> -prefix5 <snapshot_prefix> -snapmirror-label5 <snapshot_label>
The following example creates a Snapshot policy named
snap_policy_daily
that runs on adaily
schedule. The policy has a maximum of five Snapshot copies, each with the namedaily
.timestamp
and the SnapMirror labeldaily
:cluster1::> volume snapshot policy create -vserver vs0 -policy snap_policy_daily -schedule1 daily -count1 5 -snapmirror-label1 daily