firebasegoogle-cloud-firestoregoogle-cloud-datastore

How to migrate data from MongoDB to Firestore?


We want to migrate huge volume of data (~20 million documents) from MongoDB to Firestore.

Does Firestore have any features to support migrations from MongoDB other than using the client libraries to export/import?


Solution

  • Edit: 2025-04-25

    Firestore now has MongoDB compatibility. You can convert your MongoDB database to Firestore:

    ---

    I know we can do this through programmatically but is there any tool out there?

    The answer is no! If you're looking for a magic button that can convert your MongoDB database to Cloud Firestore,you need to know that there isn't one! So, unfortunately, you'll need to convert your database yourself, even if it holds 20 million records. The best way to achieve that is to design your database schema according to Firestore requirements using collections and documents, and copy all of your data in smaller chunks.