NetApp
ONTAP SnapMirror Cutover Runbook With CLI and REST API
When to Use This Runbook
Use this runbook when a workload is being cut over from a SnapMirror source volume to a destination volume. This pattern fits dev, UAT, and production migration changes where the destination must be made writable after the final replication update.
NetApp’s command reference documents the SnapMirror operations used here, including snapmirror initialize, snapmirror update, snapmirror quiesce, snapmirror break, snapmirror resync, snapmirror delete, and snapmirror release: ONTAP SnapMirror commands.
Best-Practice Prechecks
Do not start a cutover by breaking the relationship. Confirm the replication state, lag, host plan, DNS or mount change, and rollback point first.
snapmirror show -destination-path dst_svm:app_data_dst
volume show -vserver dst_svm -volume app_data_dst
volume show-space -vserver dst_svm -volume app_data_dst
vserver export-policy rule show -vserver dst_svm
Confirm these items before approval:
| Check | Good State |
|---|---|
| Cluster and SVM peering | Available and authenticated |
| Relationship health | Healthy |
| Lag time | Inside the approved cutover window |
| Destination volume | DP/protected before break |
| Host plan | Mount, DNS, export, or application change documented |
| Rollback | Source volume remains intact until validation finishes |
CLI Cutover Process
Run a final update before the application outage.
snapmirror show -destination-path dst_svm:app_data_dst
volume show -vserver dst_svm -volume app_data_dst
volume show-space -vserver dst_svm -volume app_data_dst
vserver export-policy rule show -vserver dst_svm
Stop application writes to the source. Then quiesce the relationship so no scheduled transfer starts during cutover.
snapmirror show -destination-path dst_svm:app_data_dst
volume show -vserver dst_svm -volume app_data_dst
volume show-space -vserver dst_svm -volume app_data_dst
vserver export-policy rule show -vserver dst_svm
Run one final update if the relationship allows it and the source is quiet.
snapmirror show -destination-path dst_svm:app_data_dst
volume show -vserver dst_svm -volume app_data_dst
volume show-space -vserver dst_svm -volume app_data_dst
vserver export-policy rule show -vserver dst_svm
Break the relationship to make the destination writable.
snapmirror show -destination-path dst_svm:app_data_dst
volume show -vserver dst_svm -volume app_data_dst
volume show-space -vserver dst_svm -volume app_data_dst
vserver export-policy rule show -vserver dst_svm
Apply the host access change, such as an export policy update, DNS change, mount update, or application config change. Validate the application before calling the cutover complete.
REST API Process
Discover the relationship:
snapmirror show -destination-path dst_svm:app_data_dst
volume show -vserver dst_svm -volume app_data_dst
volume show-space -vserver dst_svm -volume app_data_dst
vserver export-policy rule show -vserver dst_svm
Trigger an update:
snapmirror show -destination-path dst_svm:app_data_dst
volume show -vserver dst_svm -volume app_data_dst
volume show-space -vserver dst_svm -volume app_data_dst
vserver export-policy rule show -vserver dst_svm
Quiesce before cutover:
snapmirror show -destination-path dst_svm:app_data_dst
volume show -vserver dst_svm -volume app_data_dst
volume show-space -vserver dst_svm -volume app_data_dst
vserver export-policy rule show -vserver dst_svm
Break the relationship:
snapmirror show -destination-path dst_svm:app_data_dst
volume show -vserver dst_svm -volume app_data_dst
volume show-space -vserver dst_svm -volume app_data_dst
vserver export-policy rule show -vserver dst_svm
Check the destination volume:
snapmirror show -destination-path dst_svm:app_data_dst
volume show -vserver dst_svm -volume app_data_dst
volume show-space -vserver dst_svm -volume app_data_dst
vserver export-policy rule show -vserver dst_svm
Backout
If the destination has not been made writable, continue using the source and resume the relationship. If the relationship has been broken but users have not written to the destination, resync might still be a clean option. If users have written to the destination, stop and make a data decision before resyncing because resync can discard changes on the resync destination.
snapmirror show -destination-path dst_svm:app_data_dst
volume show -vserver dst_svm -volume app_data_dst
volume show-space -vserver dst_svm -volume app_data_dst
vserver export-policy rule show -vserver dst_svm
Post-Change Evidence
Capture:
snapmirror show -destination-path dst_svm:app_data_dst
volume show -vserver dst_svm -volume app_data_dst
volume show-space -vserver dst_svm -volume app_data_dst
vserver export-policy rule show -vserver dst_svm
The change is complete only after the application owner confirms read/write behavior on the destination.
Comments