Migrate to Firestore with MongoDB compatibility

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:

  1. 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.

  2. Create a Cloud Storage bucket that will receive the data and the change events from your MongoDB-compatible source database.

  3. Create a destination Datastream connection profile that uses this Cloud Storage bucket.

  4. Create and actuate a Datastream stream that connects the source connection profile to the destination connection profile.

  5. Initiate a Dataflow pipeline to begin injecting the captured data into your Cloud Firestore with MongoDB compatibility database.

  6. Monitor the stream to identify important milestones in the migration process to determine whether any errors were encountered during the data transfer.

  7. 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.

  8. Enable write traffic to your Cloud Firestore with MongoDB compatibility database.