Mirroring WORM files

You can use SnapMirror to replicate WORM files to another geographic location for disaster recovery and other purposes. Both the source volume and destination volume must be configured for SnapLock, and both volumes must have the same SnapLock mode, Compliance or Enterprise. All key SnapLock properties of the volume and files are replicated.

Before you begin

The source and destination volumes must be created in peered clusters with peered SVMs. For more information, see the Cluster and SVM Peering Express Guide.

About this task

The following illustration shows the procedure for initializing a SnapMirror relationship:


This illustration shows the procedure for initializing a SnapMirror relationship: identifying the destination cluster, creating a destination volume, creating a SnapMirror relationship between the volumes, and then initializing the relationship to start a baseline transfer.

Procedure

  1. Identify the destination cluster.
  2. On the destination cluster, install the SnapLock license, initialize the ComplianceClock, and create a SnapLock aggregate.
  3. On the destination cluster, create a SnapLock destination volume of type DP that is either the same size as or greater in size than the source volume: volume create -vserver SVM_name -volume volume_name -aggregate aggregate_name -type DP -size size
    Note: The SnapLock mode—Compliance or Enterprise—is inherited from the aggregate. Version-flexible destination volumes are not supported. The language setting of the destination volume must match the language setting of the source volume.
    The following command creates a 2 GB SnapLock Compliance volume named dstvolB in SVM2 on the aggregate node01_aggr:
    cluster2::> volume create -vserver SVM2 -volume dstvolB -aggregate node01_aggr -type DP -size 2GB
  4. On the destination SVM, create a SnapMirror policy: snapmirror policy create -vserver SVM_name -policy policy_name
    The following command creates the SVM-wide policy SVM1-mirror:
    SVM2::> snapmirror policy create -vserver SVM2 -policy SVM1-mirror
  5. On the destination SVM, create a SnapMirror schedule: job schedule cron create -name schedule_name -dayofweek day_of_week -hour hour -minute minute
    The following command creates a SnapMirror schedule named weekendcron:
    SVM2::> job schedule cron create -name weekendcron -dayofweek "Saturday, Sunday" -hour 3 -minute 0
  6. On the destination SVM, create a SnapMirror relationship: snapmirror create -source-path source_path -destination-path destination_path -type XDP|DP -policy policy_name -schedule schedule_name
    The following command creates a SnapMirror relationship between the source volume srcvolA on SVM1 and the destination volume dstvolB on SVM2, and assigns the policy SVM1-mirror and the schedule weekendcron:
    SVM2::> snapmirror create -source-path SVM1:srcvolA -destination-path SVM2:dstvolB -type XDP -policy SVM1-mirror -schedule weekendcron
    
    Note: The XDP type is available in ONTAP 9.5 and later. You must use the DP type in ONTAP 9.4 and earlier.
  7. On the destination SVM, initialize the SnapMirror relationship: snapmirror initialize -destination-path destination_path
    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 that it references to the destination volume. It also transfers any other Snapshot copies on the source volume to the destination volume.
    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