Skip to main content

Replicate an entire SVM configuration

Contributors netapp-lenida netapp-ahibbard netapp-thomi

You can create an SVM disaster recovery (SVM DR) relationship to replicate one SVM configuration to another. In the event of a disaster at the primary site, you can quickly activate the destination SVM.

Before you begin

The source and destination clusters and SVMs must be peered. For more information, see Create a cluster peer relationship and Create an SVM intercluster peer relationship.

For complete command syntax, see the man page.

About this task

This workflow assumes that you are already using a default policy or a custom replication policy.

Beginning with ONTAP 9.9.1, when you use the mirror-vault policy, you can create different Snapshot policies on the source and destination SVM, and the Snapshot copies on the destination are not overwritten by Snapshot copies on the source. For more information, see Understanding SnapMirror SVM replication.

Complete this procedure from the destination. If you need to create a new protection policy, for instance, when your source storage VM has SMB configured, you should use System Manager to create the policy and select the Identity preserve option in the Add Protection Policy window. For details see Create custom data protection policies.

Steps

You can perform this task from System Manager or the ONTAP CLI.

System Manager
  1. On the destination cluster, click Protection > Relationships.

  2. Under Relationships, click Protect and choose Storage VMs (DR).

  3. Select a protection policy. If you created a custom protection policy, select it, then choose the source cluster and storage VM you want to replicate. You can also create a new destination storage VM by entering a new storage VM name.

  4. If desired, change the destination settings to override identity preserve and choosing to include or exclude network interfaces and protocols.

  5. Click Save.

CLI
  1. Create a destination SVM:

    vserver create -vserver <SVM_name> -subtype dp-destination

    The SVM name must be unique across the source and destination clusters.

    The following example creates a destination SVM named svm_backup:

    cluster_dst:> vserver create -vserver svm_backup -subtype dp-destination
  2. From the destination cluster, create an SVM peer relationship using the vserver peer create command.

  3. Create a replication job schedule:

    job schedule cron create -name <job_name> -month <month> -dayofweek <day_of_week> -day <day_of_month> -hour <hour> -minute <minute>

    For -month, -dayofweek, and -hour, you can specify all to run the job every month, day of the week, and hour, respectively.

    Note The minimum supported schedule (RPO) for FlexVol volumes in an SVM SnapMirror relationship is 15 minutes. The minimum supported schedule (RPO) for FlexGroup volumes in an SVM SnapMirror relationship is 30 minutes.

    The following example creates a job schedule named my_weekly that runs on Saturdays at 3:00 a.m.:

    cluster_dst::> job schedule cron create -name my_weekly -dayofweek saturday -hour 3 -minute 0
  4. From the destination SVM or the destination cluster, create a replication relationship:

    snapmirror create -source-path <SVM_name>: -destination-path <SVM_name>: -type <DP|XDP> -schedule <schedule> -policy <policy> -identity-preserve true
    Note You must enter a colon (:) after the SVM name in the -source-path and -destination-path options.

    The following example creates a SnapMirror DR relationship using the default MirrorAllSnapshots policy:

    cluster_dst::> snapmirror create -source-path svm1: -destination-path svm_backup: -type XDP -schedule my_daily -policy MirrorAllSnapshots -identity-preserve true

    The following example creates a unified replication relationship using the default MirrorAndVault policy:

    cluster_dst:> snapmirror create -source-path svm1: -destination-path svm_backup: -type XDP -schedule my_daily -policy MirrorAndVault -identity-preserve true

    Assuming you have created a custom policy with the policy type async-mirror, the following example creates a SnapMirror DR relationship:

    cluster_dst::> snapmirror create -source-path svm1: -destination-path svm_backup: -type XDP -schedule my_daily -policy my_mirrored -identity-preserve true

    Assuming you have created a custom policy with the policy type mirror-vault, the following example creates a unified replication relationship:

    cluster_dst::> snapmirror create -source-path svm1: -destination-path svm_backup: -type XDP -schedule my_daily -policy my_unified -identity-preserve true
  5. Stop the destination SVM:

    vserver stop -vserver <SVM_name>

    The following example stops a destination SVM named svm_backup:

    cluster_dst::> vserver stop -vserver svm_backup
  6. From the destination SVM or the destination cluster, initialize the SVM replication relationship:

    snapmirror initialize -source-path <SVM_name>: -destination-path <SVM_name>:
    Note You must enter a colon (:) after the SVM name in the -source-path and -destination-path options.

    The following example initializes the relationship between the source SVM, svm1, and the destination SVM, svm_backup:

    cluster_dst::> snapmirror initialize -source-path svm1: -destination-path svm_backup: