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.
system health status show
cluster peer show
vserver peer show
snapmirror show -destination-path <dst_svm>:<dst_vol>
snapmirror show -destination-path <dst_svm>:<dst_vol> -fields status,healthy,lag-time,state,relationship-status
volume show -vserver <src_svm> -volume <src_vol>
volume show -vserver <dst_svm> -volume <dst_vol>
volume snapshot show -vserver <src_svm> -volume <src_vol>
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 update -destination-path dst_svm:app_data_dst
snapmirror show -destination-path dst_svm:app_data_dst
Stop application writes to the source. Then quiesce the relationship so no scheduled transfer starts during cutover.
snapmirror quiesce -destination-path dst_svm:app_data_dst
snapmirror show -destination-path dst_svm:app_data_dst -fields state,relationship-status
Run one final update if the relationship allows it and the source is quiet.
snapmirror update -destination-path dst_svm:app_data_dst
Break the relationship to make the destination writable.
snapmirror break -destination-path dst_svm:app_data_dst
volume show -vserver dst_svm -volume app_data_dst -fields type,state
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:
curl -k -u admin:'<password>' \
"https://cluster.example.com/api/snapmirror/relationships?destination.path=dst_svm:app_data_dst&fields=uuid,healthy,state,transfer,lag_time,source,destination"
Trigger an update:
curl -k -u admin:'<password>' \
-X PATCH \
"https://cluster.example.com/api/snapmirror/relationships/<relationship_uuid>" \
-H "Content-Type: application/json" \
-d '{ "state": "transferring" }'
Quiesce before cutover:
curl -k -u admin:'<password>' \
-X PATCH \
"https://cluster.example.com/api/snapmirror/relationships/<relationship_uuid>" \
-H "Content-Type: application/json" \
-d '{ "state": "paused" }'
Break the relationship:
curl -k -u admin:'<password>' \
-X PATCH \
"https://cluster.example.com/api/snapmirror/relationships/<relationship_uuid>" \
-H "Content-Type: application/json" \
-d '{ "state": "broken_off" }'
Check the destination volume:
curl -k -u admin:'<password>' \
"https://cluster.example.com/api/storage/volumes?svm.name=dst_svm&name=app_data_dst&fields=name,type,state,space,nas.path"
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 resync -destination-path dst_svm:app_data_dst
snapmirror show -destination-path dst_svm:app_data_dst
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.