Skip to main content

Creating a SnapVault relationship

You must create a SnapVault relationship between the source volume on one cluster and the destination volume on the peered cluster to create a SnapVault backup.

Before you begin

  • Before you can use integrated SnapVault technology to archive Snapshot copies to disk, you need to configure a data-protection relationship between the source and destination volumes, then initialize the relationship. Upon initialization, SnapVault makes a Snapshot copy of the source volume, then transfers the copy and all the data blocks it references to the destination volume.

  • You must have the cluster administrator user name and password for the destination cluster.

  • The destination aggregate must have available space.

About this task

You can use the Data ONTAP command-line interface (CLI) to create a SnapVault relationship. The following operations are performed on the CLI.

  1. Identify the destination cluster.
  2. On the destination cluster, run the volume create command with the -type DP option to create a SnapVault destination volume with the same or larger size than the source volume.
    Note
    The language setting of the destination volume must match that of the source volume.

    Example

    The following command creates a 2 GB destination volume named dstvolB in SVM2 on the aggregate node01_aggr:cluster2::> volume create -vserver SVM2 -volume dstvolB -aggregate node01_aggr -type DP -size 2GB

  3. On the destination SVM, run the snapmirror policy create command to create a SnapVault policy.

    Example

    The following command creates the SVM-wide policy SVM1-vault: SVM2::> snapmirror policy create -vserver SVM2 -policy SVM1-vault

    Note
    If you install the snapcenter, define a cron schedule or Snapshot copy policy for the SnapVault relationship when you create a backup schedule.
  4. Run the snapmirror create command with the -type XDP parameter and the -policy parameter to create a SnapVault relationship and assign a vault policy. The XDP type defines the relationship as a SnapVault relationship.

    Example

    The following command creates a SnapVault relationship between the source volume srcvolA on SVM1 and the destination volume dstvolB on SVM2: SVM2::> snapmirror create -source-path SVM1:srcvolA -destination-path SVM2:dstvolB -type XDP

  5. Run the snapmirror initialize command to initialize the relationship.
    The initialization process performs a baseline transfer to the destination volume. SnapMirror makes a Snapshot copy of the source volume, then transfers the copy and all the data blocks it references to the destination volume.

    Example

    The following command initializes the relationship between the source volume srcvolA on SVM1 and the destination volume dstvolB on SVM2: SVM2::> snapmirror initialize -destination-path SVM2:dstvolB

Scheduling SnapVault protection

SnapMirror relationships of all types are still scheduled via the schedule parameter on the SnapMirror relationship itself, as shown in the output of snapmirror show -instance.

Example

Cluster2::> snapmirror show -instance

Source Path: svmSrc:volSrc
Destination Path: svmDst:volDst
Relationship Type: XDP
Relationship Group Type: none
SnapMirror Schedule: daily



SnapMirror policies have a new and separate schedule parameter that can be configured as part of a SnapMirror policy rule. This parameter can be seen in the output of snapmirror policy show -instance and is an option when you create or modify a SnapMirror policy rule with snapmirror policy add-rule or snapmirror policy modify-rule.

Example

Cluster2::> snapmirror policy show -policy CustomMirrorVault -instance

Vserver: svm2
SnapMirror Policy Name: CustomMirrorVault
SnapMirror Policy Type: vault
Policy Owner: cluster-admin
Tries Limit: 8
Transfer Priority: normal
Ignore accesstime Enabled: false
Transfer Restartability: always
Network Compression Enabled: false
Create Snapshot: false
Comment: -
Total Number of Rules: 2
Total Keep: 15
Rules:
SnapMirror Label Keep Preserve Warn Schedule Prefix
----------------------------- ---- -------- ---- -------- ----------
daily 10 false 0 - -
weekly 5 false 0 weekly weekly

Cluster2::> snapmirror policy add-rule ?
-vserver Vserver Name
[-policy] SnapMirror Policy Name
[-snapmirror-label] Snapshot Copy Label
[-keep] Snapshot Copy Retention Count
[[-preserve] {true|false}] Snapshot Copy Preserve Enabled
[ -warn <integer> ] Warning Threshold Count
[ -schedule ] Snapshot Copy Creation Schedule
[ -prefix ] Snapshot Copy Creation Prefix
This schedule parameter is found in a SnapMirror policy rule is not a transfer schedule and will not trigger a backup. Instead, this schedule controls a new feature known as secondary SnapVault Snapshot copies. This feature creates independent snapshot copies on a SnapVault secondary volume without having to create and maintain a corresponding Snapshot copy on the SnapVault primary volume. When a schedule is used in a SnapMirror policy rule assigned to a SnapMirror relationship, that rule will create snapshots on the SnapVault secondary volume when the schedule triggers. These rules will not trigger an update and snapshots with the configured label will not be backed up from the primary volume. If you want your rule to back up snapshots from the SnapVault primary volume, re-create your rule without the schedule parameter. Other high-level details and caveats for the secondary SnapVault Snapshot copy feature include:
  • This feature is only available for use with vault and mirror-vault types of SnapMirror policies.

  • You must have at least one rule in your SnapMirror policy with no schedule parameter.