Cloud Firestore Enterprise edition with MongoDB compatibility is now available!
Learn more.
Migrate to Firestore with MongoDB compatibility
Stay organized with collections
Save and categorize content based on your preferences.
Relevant to Cloud Firestore Enterprise edition only.
|
You can migrate your MongoDB-compatible source database to a Firestore with
MongoDB compatibility database with minimal downtime.
Migration steps
This section details out the various migration steps.
The Datastream service creates a stream between a source and a destination. In
this case, the source is your current MongoDB-compatible deployment, while the
destination is Cloud Storage. This process has the following steps:
Create a source Datastream connection profile
for your MongoDB source. Specific instructions depend on the type and the way
your MongoDB-compatible source is deployed.
Create a Cloud Storage bucket
that will receive the data and the change events from your
MongoDB-compatible source database.
Create a destination Datastream connection profile
that uses this Cloud Storage bucket.
Create and actuate a Datastream stream
that connects the source connection profile to the destination connection
profile.
Initiate a Dataflow pipeline
to begin injecting the captured data into your Cloud Firestore
with MongoDB compatibility database.
Monitor the stream
to identify important milestones in the migration process to determine
whether any errors were encountered during the data transfer.
When it's appropriate, shut down write traffic
to the source database. After all data, including recent changes, was
replicated to the Cloud Firestore with MongoDB compatibility
database, redirect read traffic to the new destination.
Enable write traffic
to your Cloud Firestore with MongoDB compatibility database.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-25 UTC.
[null,null,["Last updated 2025-08-25 UTC."],[],[],null,["\u003cbr /\u003e\n\n\n|--------------------------------------------------------|\n| *Relevant to Cloud Firestore Enterprise edition only.* |\n\n\u003cbr /\u003e\n\nYou can migrate your MongoDB-compatible source database to a Firestore with\nMongoDB compatibility database with minimal downtime.\n\nMigration steps\n\nThis section details out the various migration steps.\n\nThe Datastream service creates a stream between a source and a destination. In\nthis case, the source is your current MongoDB-compatible deployment, while the\ndestination is Cloud Storage. This process has the following steps:\n\n1. [Create a source Datastream connection profile](https://cloud.google.com/firestore/mongodb-compatibility/docs/migrate-create-connection-profiles)\n for your MongoDB source. Specific instructions depend on the type and the way\n your MongoDB-compatible source is deployed.\n\n2. [Create a Cloud Storage bucket](https://cloud.google.com/firestore/mongodb-compatibility/docs/migrate-configure-resources#create-bucket)\n that will receive the data and the change events from your\n MongoDB-compatible source database.\n\n3. [Create a destination Datastream connection profile](https://cloud.google.com/firestore/mongodb-compatibility/docs/migrate-create-connection-profiles#connection-profile-storage)\n that uses this Cloud Storage bucket.\n\n4. [Create and actuate a Datastream stream](https://cloud.google.com/firestore/mongodb-compatibility/docs/migrate-import-from-source)\n that connects the source connection profile to the destination connection\n profile.\n\n5. [Initiate a Dataflow pipeline](https://cloud.google.com/firestore/mongodb-compatibility/docs/migrate-write-to-destination)\n to begin injecting the captured data into your Cloud Firestore\n with MongoDB compatibility database.\n\n6. [Monitor the stream](https://cloud.google.com/firestore/mongodb-compatibility/docs/migrate-traffic#migration-completion-milestones)\n to identify important milestones in the migration process to determine\n whether any errors were encountered during the data transfer.\n\n7. When it's appropriate, [shut down write traffic](https://cloud.google.com/firestore/mongodb-compatibility/docs/migrate-traffic#shut-down-write-traffic)\n to the source database. After all data, including recent changes, was\n replicated to the Cloud Firestore with MongoDB compatibility\n database, redirect read traffic to the new destination.\n\n8. [Enable write traffic](https://cloud.google.com/firestore/mongodb-compatibility/docs/migrate-traffic#migrate-write-traffic)\n to your Cloud Firestore with MongoDB compatibility database."]]