範例:設定資料保險箱串聯
範例將具體說明如何一次設定一個步驟的複寫關係。您可以使用範例中設定的保存庫資料保險箱串聯部署、來保留超過251個標示為「每週一次」的Snapshot複本。
-
來源與目的地叢集和SVM必須進行對等關係。
-
您必須執行ONTAP 的是版本不含更新版本的版本。早期ONTAP 版本的不支援保存庫-保存庫串聯。
範例假設如下:
-
您已在來源叢集上設定Snapshot複本、其SnapMirror標籤為「每日」、「每週」和「每月」。
-
您已在二線和三線目的地叢集上設定名為「Vola」的目的地Volume。
-
您已在二線和三線目的地叢集上設定名為「my_SnapVault」的複寫工作排程。
範例顯示如何根據兩個自訂原則建立複寫關係:
-
「shnapVault_secondary」原則會在次要目的地叢集上保留每日7份、每週52份及每月180份Snapshot複本。
-
「shnapVault_三 線原則」會在三線目的地叢集上保留250個每週Snapshot複本。
-
在次要目的地叢集上、建立「snapVault_secondary」原則:
cluster_secondary::> snapmirror policy create -policy snapvault_secondary -type vault -comment “Policy on secondary for vault to vault cascade” -vserver svm_secondary
-
在次要目的地叢集上、定義原則的「每日」規則:
cluster_secondary::> snapmirror policy add-rule -policy snapvault_secondary -snapmirror-label my-daily -keep 7 -vserver svm_secondary
-
在次要目的地叢集上、定義原則的「每週」規則:
cluster_secondary::> snapmirror policy add-rule -policy snapvault_secondary -snapmirror-label my-weekly -keep 52 -vserver svm_secondary
-
在次要目的地叢集上、定義原則的「每月」規則:
cluster_secondary::> snapmirror policy add-rule -policy snapvault_secondary -snapmirror-label my-monthly -keep 180 -vserver svm_secondary
-
在次要目的地叢集上、驗證原則:
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 - -
-
在次要目的地叢集上、建立與來源叢集的關係:
cluster_secondary::> snapmirror create -source-path svm_primary:volA -destination-path svm_secondary:volA -type XDP -schedule my_snapvault -policy snapvault_secondary
-
在次要目的地叢集上、初始化與來源叢集的關係:
cluster_secondary::> snapmirror initialize -source-path svm_primary:volA -destination-path svm_secondary:volA
-
在第三目的地叢集上、建立「snapVault_三 線」原則:
cluster_tertiary::> snapmirror policy create -policy snapvault_tertiary -type vault -comment “Policy on tertiary for vault to vault cascade” -vserver svm_tertiary
-
在第三個目的地叢集上、定義原則的「每週」規則:
cluster_tertiary::> snapmirror policy add-rule -policy snapvault_tertiary -snapmirror-label my-weekly -keep 250 -vserver svm_tertiary
-
在第三目的地叢集上、確認原則:
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 - -
-
在第三個目的地叢集上、建立與第二個叢集的關係:
cluster_tertiary::> snapmirror create -source-path svm_secondary:volA -destination-path svm_tertiary:volA -type XDP -schedule my_snapvault -policy snapvault_tertiary
-
在第三個目的地叢集上、初始化與第二個叢集的關係:
cluster_tertiary::> snapmirror initialize -source-path svm_secondary:volA -destination-path svm_tertiary:volA