Table of ContentsView in Frames

Creating a version-flexible SnapMirror relationship

You can protect data by replicating selected Snapshot copies to a version-flexible SnapMirror destination volume on another Storage Virtual Machine (SVM) or cluster.

Before you begin

Steps

  1. On the destination SVM, create a SnapMirror destination volume with a volume type DP.
    For information about creating a FlexVol volume, see the Clustered Data ONTAP System Administration Guide for Cluster Administrators.
  2. On the source SVM, create a Snapshot copy policy that contains the schedule of when Snapshot copies with snapmirror-label attributes occur.
    You can use the volume snapshot policy create command with the snapmirror-label parameter.
    Example
    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 
    all_source_snapshots -schedule2 daily -count2 6 -prefix2 daily 
    -snapmirror-label2 all_source_snapshots -schedule3 hourly -count3 8 
    -prefix3 hourly -snapmirror-label3 all_source_snapshots
    The name specified in the snapmirror-label attribute for the new Snapshot policy must match the snapmirror-label attribute that is specified in the version-flexible SnapMirror policy. This ensures that all subsequent Snapshot copies created on the primary volume have labels that are recognized by the version-flexible SnapMirror policy.

    The default Snapshot copy policy has two snapmirror-label attributes associated with it, daily and weekly.

  3. Create a version-flexible SnapMirror policy by using the snapmirror policy create command.
    Example
    The following command creates a version-flexible SnapMirror policy called "vserverB-DR-policy" that will be used for SnapMirror style disaster recovery in which only the SnapMirror created Snapshot copy is transferred:
    vserverB::> snapmirror policy create -vserver vserverB -policy vserverB-DR-policy 
    -policy-type async-mirror -comment "DR policy"
    Example
    The following command creates a version-flexible SnapMirror policy called "vserverB-asyncDR-policy" that will be used for SnapMirror style disaster recovery in which all source Snapshot copies are transferred:
    vserverB::> snapmirror policy create -vserver vserverB -policy vserverB-asyncDR-policy 
    -policy-type async-mirror -comment "Async DR policy"
    Example
    The following command creates a version-flexible SnapMirror policy called "vserverB-SM-SV-policy" that will be used for both SnapMirror and SnapVault relationships in the same volume:
    vserverB::> snapmirror policy create -vserver vserverB -policy vserverB-SM-SV-policy 
    -policy-type mirror-vault -comment "SnapMirror and SnapVault combo policy"
  4. Add the snapmirror-label attribute to the version-flexible SnapMirror policy you created by using the snapmirror policy add-rule command.
    Example
    No added rule is required because the SnapMirror policy transfers on the SnapMirror created Snapshot copies and keeps one Snapshot copy.
    Example
    The following command adds a rule to the vserverB-asyncDR-policy to transfer Snapshot copies with the "sm_created" and "all_source_snapshots" snapmirror-label attribute and to keep 1 Snapshot copy of each:
    vserverB::> snapmirror policy add-rule -vserver vserverB -policy 
    vserverB-asyncDR-policy -snapmirror-label all_source_snapshots -keep 1
    Example
    The following command adds rules to the vserverB-SM-SV-policy to transfer Snapshot copies with the "sm_created", "daily", and "weekly" snapmirror-label attributes and to keep 1 "sm_created" Snapshot copy, 20 "daily" Snapshot copies, and 26 "weekly" Snapshot copies:
    vserverB::> snapmirror policy add-rule -vserver vserverB -policy 
    vserverB-SM-SV-policy -snapmirror-label sm_created -keep 1
    vserverB::> snapmirror policy add-rule -vserver vserverB -policy 
    vserverB-DR-policy -snapmirror-label daily -keep 20
    vserverB::> snapmirror policy add-rule -vserver vserverB -policy 
    vserverB-DR-policy -snapmirror-label weekly -keep 26
  5. On the destination SVM, create a version-flexible SnapMirror relationship and assign a version-flexible SnapMirror 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.
    Example
    The following command creates a version-flexible SnapMirror relationship between the source volume "srcvolA" on SVM "vserverA" and the empty destination volume "dstvolB" on SVM "vserverB". It assigns the version-flexible SnapMirror policy named "vserverB-DR-policy" and uses the "daily" schedule:
    vserverB::> snapmirror create -source-path vserverA:srcvolA
    -destination-path vserverB:dstvolB -type XDP -policy 
    vserverB-DR-policy -schedule daily

    If you are creating version-flexible SnapMirror relationships using one of the other version-flexible SnapMirror policies, the command syntax is the same but you replace the policy name with the policy that you want to use.

  6. On the destination SVM, initialize the version-flexible SnapMirror relationship by using the snapmirror initialize command to start a baseline transfer.
    The command creates a new Snapshot copy that is transferred to the destination volume and used as a baseline for subsequent incremental Snapshot copies. The command does not use any Snapshot copies that currently exist on the source volume.
    Note: Creating a baseline for a large amount of data might take hours.
    Example
    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
    vserverB:dstvolB