ONTAP 9 Manuals ( CA08871-402 )

Create a 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.

About this task

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.

Step
  1. 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 a daily schedule. The policy has a maximum of five Snapshot copies, each with the name daily.timestamp and the SnapMirror label daily:

    cluster1::> volume snapshot policy create -vserver vs0 -policy snap_policy_daily -schedule1 daily -count1 5 -snapmirror-label1 daily
Top of Page