Example: Configure an ONTAP SnapMirror vault-vault cascade
An example will show in concrete terms how you can configure replication relationships one step at a time. You can use the vault-vault cascade deployment configured in the example to retain more than 251 snapshots labeled my-weekly
.
The source and destination clusters and SVMs must be peered.
The example assumes the following:
-
You have configured snapshots on the source cluster with the SnapMirror labels
my-daily
,my-weekly
, andmy-monthly
. -
You have configured destination volumes named
volA
on the secondary and tertiary destination clusters. -
You have configured replication job schedules named
my_snapvault
on the secondary and tertiary destination clusters.
The example shows how to create replication relationships based on two custom policies:
-
The
snapvault_secondary
policy retains 7 daily, 52 weekly, and 180 monthly snapshots on the secondary destination cluster. -
The
snapvault_tertiary policy
retains 250 weekly snapshots on the tertiary destination cluster.
-
On the secondary destination cluster, create the
snapvault_secondary
policy:cluster_secondary::> snapmirror policy create -policy snapvault_secondary -type vault -comment "Policy on secondary for vault to vault cascade" -vserver svm_secondary
-
On the secondary destination cluster, define the
my-daily
rule for the policy:cluster_secondary::> snapmirror policy add-rule -policy snapvault_secondary -snapmirror-label my-daily -keep 7 -vserver svm_secondary
-
On the secondary destination cluster, define the
my-weekly
rule for the policy:cluster_secondary::> snapmirror policy add-rule -policy snapvault_secondary -snapmirror-label my-weekly -keep 52 -vserver svm_secondary
-
On the secondary destination cluster, define the
my-monthly
rule for the policy:cluster_secondary::> snapmirror policy add-rule -policy snapvault_secondary -snapmirror-label my-monthly -keep 180 -vserver svm_secondary
-
On the secondary destination cluster, verify the policy:
cluster_secondary::> snapmirror policy show snapvault_secondary -instance
Vserver: svm_secondary SnapMirror Policy Name: snapvault_secondary 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: Policy on secondary for vault to vault cascade Total Number of Rules: 3 Total Keep: 239 Rules: SnapMirror Label Keep Preserve Warn Schedule Prefix ---------------- ---- -------- ---- -------- ------ my-daily 7 false 0 - - my-weekly 52 false 0 - - my-monthly 180 false 0 - -
-
On the secondary destination cluster, create the relationship with the source cluster:
cluster_secondary::> snapmirror create -source-path svm_primary:volA -destination-path svm_secondary:volA -type XDP -schedule my_snapvault -policy snapvault_secondary
-
On the secondary destination cluster, initialize the relationship with the source cluster:
cluster_secondary::> snapmirror initialize -source-path svm_primary:volA -destination-path svm_secondary:volA
-
On the tertiary destination cluster, create the
snapvault_tertiary
policy:cluster_tertiary::> snapmirror policy create -policy snapvault_tertiary -type vault -comment "Policy on tertiary for vault to vault cascade" -vserver svm_tertiary
-
On the tertiary destination cluster, define the
my-weekly
rule for the policy:cluster_tertiary::> snapmirror policy add-rule -policy snapvault_tertiary -snapmirror-label my-weekly -keep 250 -vserver svm_tertiary
-
On the tertiary destination cluster, verify the policy:
cluster_tertiary::> snapmirror policy show snapvault_tertiary -instance
Vserver: svm_tertiary SnapMirror Policy Name: snapvault_tertiary 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: Policy on tertiary for vault to vault cascade Total Number of Rules: 1 Total Keep: 250 Rules: SnapMirror Label Keep Preserve Warn Schedule Prefix ---------------- ---- -------- ---- -------- ------ my-weekly 250 false 0 - -
-
On the tertiary destination cluster, create the relationship with the secondary cluster:
cluster_tertiary::> snapmirror create -source-path svm_secondary:volA -destination-path svm_tertiary:volA -type XDP -schedule my_snapvault -policy snapvault_tertiary
-
On the tertiary destination cluster, initialize the relationship with the secondary cluster:
cluster_tertiary::> snapmirror initialize -source-path svm_secondary:volA -destination-path svm_tertiary:volA