Verify with Migration Verifier
On this page
Migration Verifier connects to the source and destination clusters and performs a series of verification checks, comparing documents, views, and indexes to confirm the sync was successful.
Unlike other verification methods, Migration Verifier can run concurrently with
mongosync
, checking documents on the destination cluster as they sync. This
can reduce the amount of time needed to verify the success of the sync before
transferring your application load from the source to the destination cluster.
About This Task
Note
Migration Verifier does not support DDL operations. Do not run any DDL operations on the source cluster while verifying data with Migration Verifier.
Migration Verifier is an experimental and unsupported tool.
For installation instructions and usage limitations, see GitHub.
Steps
Sync Clusters
Sync the source and destination clusters using mongosync
. For more
information, see Cluster-to-Cluster Sync Quickstart.
Wait for mongosync
to reach CEA
Before you can start verification checks with Migration Verifier,
you must wait until mongosync
reaches the Change Event Application
(CEA) phase.
To check that mongosync
has reached the CEA phase, send the
/progress command and check that the
progress.info
field returns change event application
.
curl localhost:27182/api/v1/progress -XGET
{ "progress": { "state":"RUNNING", "canCommit":true, "canWrite":false, "info":"change event application", "lagTimeSeconds":0, "collectionCopy": { "estimatedTotalBytes":694, "estimatedCopiedBytes":694 }, "directionMapping": { "Source":"cluster0: localhost:27017", "Destination":"cluster1: localhost:27018" } } }
Check Progress
To view the results, use cURL to send the progress
command to
Migration Verifier.
curl -H "Content-Type: application/json" \ -X GET http://127.0.0.1:27020/api/v1/progress
{ "progress": { "phase": "idle", "error": null, "verificationStatus": { "totalTasks": 1, "addedTasks": 0, "processingTasks": 0, "failedTasks": 0, "completedTasks": 0, "metadataMismatchTasks": 0, "recheckTasks": 0 } } }
When the phase
field is idle
, the verification checks are
complete. If the failedTasks
field returns 0, the sync was successful.