For detailed information about the system architecture, race condition prevention, data correctness guarantees, and the load test framework, please see architecture.md.
gcloudCLI installed and authenticated.- Java 11+ and Maven (for Dataflow).
- Node.js 18+ (for Cloud Functions).
- Permissions:
datastore.viewerandcloudfunctions.adminon the Source project.datastore.useranddataflow.adminon the Destination project.
This command deploys the live sink, waits 10 minutes for propagation, and starts the Dataflow backfill.
./migrate.sh run \
--source-project SOURCE_PROJECT_ID \
--source-db SOURCE_DATABASE_ID \
--source-region REGION \
--dest-project DEST_PROJECT_ID \
--dest-db DEST_DATABASE_ID \
--workers 10-
Check the Dataflow UI in the Google Cloud Console for backfill progress.
-
View Cloud Monitoring in the Destination project. You can use the following filters or PromQL queries in the Metrics Explorer to monitor progress:
Live Traffic Document Count (Log-Based):
- Filter:
metric.type="logging.googleapis.com/user/migration_doc_count" AND metric.labels.source="live" - PromQL:
sum by (op) ({"logging.googleapis.com/user/migration_doc_count", monitored_resource="global", source="live"})
Migration Lag (Log-Based):
- Filter:
metric.type="logging.googleapis.com/user/migration_lag_ms" - PromQL:
{"logging.googleapis.com/user/migration_lag_ms", monitored_resource="global"}
- Filter:
-
Generate a Monitoring Dashboard on Cloud Monitoring.
-
gcloud monitoring dashboards create --config-from-file=monitoring-dashboard.json --project=PROJECT_ID
-
Once the Dataflow job is complete and you have verified the migration, run cleanup to remove the migration infrastructure and perform a bulk delete of the migration metadata.
./migrate.sh cleanup \
--source-region REGION \
--dest-project DEST_PROJECT_ID \
--dest-db DEST_DATABASE_ID- Standard vs. Enterprise: For Standard Edition databases, the tool automatically creates index exclusions for the
_ShadowJournalfields to minimize write costs.