You can protect data that has long-term storage requirements on a FlexVol volume by replicating selected Snapshot copies to a SnapVault backup on another Storage Virtual Machine (SVM) or cluster.
Before you begin
- You must have cluster administrator privileges to perform this task for a cluster, and SVM administrator privileges to perform this task for an SVM.
- If the primary and secondary volumes are in different SVMs, the SVMs must be in a peer relationship.
If the primary and secondary volumes are in different clusters, the clusters must be in a peer relationship.
For information about creating peer relationships, see the Clustered Data ONTAP System Administration Guide for Cluster Administrators.
- A SnapVault policy must exist.
You must either create one or accept the default SnapVault policy (named XDPDefault) that is automatically assigned.
Only Snapshot copies with the labels configured in the SnapVault policy rules are replicated in SnapVault operations.
- The Snapshot policy assigned to the primary volume must include the snapmirror-label attribute.
You can create a new Snapshot policy by using the volume snapshot policy create command, or you can modify an existing policy by using the volume snapshot policy modify command to set the snapmirror-label attribute for the set of Snapshot copies that you want backed up to the SnapVault secondary volume. Other Snapshot copies on the primary volume are ignored by the SnapVault relationship.
- Your work environment must be able to accommodate the time it might take to transfer a baseline Snapshot copy with a large amount of data.
- On the destination SVM, create a SnapVault secondary volume with a volume type DP.
For information about creating a FlexVol volume, see the Clustered Data ONTAP System Administration Guide for Cluster Administrators.
- Create a schedule that Data ONTAP uses to update the SnapVault relationship by using the job schedule cron create command.
The following command creates a schedule that runs on the weekend at 3 a.m.:
vserverB::> job schedule cron create -name weekendcron -dayofweek
"Saturday, Sunday" -hour 3 -minute 0
- On the source SVM, create a Snapshot copy policy that contains the schedule
of when Snapshot copies with snapmirror-label attributes occur by using the volume snapshot policy create command with the snapmirror-label parameter, or use the default Snapshot copy policy called default.
The following command creates a Snapshot copy policy called "keep-more-snapshot"
vserverB::> snapshot policy create -vserver vs1 -policy keep-more-snapshot
-enabled true -schedule1 weekly -count1 2 -prefix1 weekly -snapmirror-label1 weekly
-schedule2 daily -count2 6 -prefix2 daily -snapmirror-label2 daily -schedule3 hourly
-count3 8 -prefix3 hourly -snapmirror-label3 hourly
The name specified in the snapmirror-label
attribute for the new Snapshot policy must match the snapmirror-label
attribute that is specified in the SnapVault policy. This ensures that all subsequent Snapshot copies created on the primary volume have labels that are recognized by the SnapVault policy.
The default Snapshot copy policy has two snapmirror-label attributes associated with it, daily and weekly.
- Create a SnapVault policy by using the snapmirror policy create command, or use the default SnapVault policy called XDPDefault.
The following command creates a SnapVault policy called "vserverB-vault-policy"
vserverB::> snapmirror policy create -vserver vserverB -policy vserverB-vault-policy
- Add the snapmirror-label attribute to the SnapVault policy you created by using the snapmirror policy add-rule command.
If you used the XDPDefault SnapMirror policy, you do not need to perform this step. The XDPDefault SnapVault policy uses the daily and weekly snapmirror-label attributes specified by the default Snapshot copy policy.
The following command adds a rule to the vserverB-vault-policy to transfer Snapshot copies with the "weekly"
snapmirror-label attribute and to keep 40 Snapshot copies:
vserverB::> snapmirror policy add-rule -vserver vserverB -policy
vserverB-vault-policy -snapmirror-label weekly -keep 40
- On the destination SVM, create a SnapVault relationship and assign a SnapVault policy by using the snapmirror create command with the type XDP parameter and the policy parameter.
In the path specification, a single name is interpreted as a volume name in the SVM from which the command is executed. To specify a volume in a different SVM or in a different cluster, you must specify the full path name.
The following command creates a SnapVault relationship between the primary volume "srcvolA"
on SVM "vserverA"
and the empty secondary volume "dstvolB"
on SVM "vserverB"
. It assigns the SnapVault policy named "vserverB-vault-policy"
and uses the "weekendcron"
vserverB::> snapmirror create -source-path vserverA:srcvolA
-destination-path vserverB:dstvolB -type XDP -policy
vserverB-vault-policy -schedule weekendcron
- On the destination SVM, initialize the SnapVault relationship by using the snapmirror initialize command to start a baseline transfer.
The command creates a new Snapshot copy that is transferred to the secondary volume and used as a baseline for subsequent incremental Snapshot copies. The command does not use any Snapshot copies that currently exist on the primary volume.
Note: Creating a baseline for a large amount of data might take a while.
The following command begins the relationship initialization by creating and transferring a baseline Snapshot copy to the destination volume "dstvolB"
on SVM "vserverB"
vserverB::> snapmirror initialize -destination-path