Home > Enterprise >  Transfer data from firebase firestore in one project to gcp firestore in another project
Transfer data from firebase firestore in one project to gcp firestore in another project

Time:12-30

I want to transfer data in Firestore in a Firebase project to Firestore in another (GCP only) project.

What is the best solution for the this work?

Does the document ID change after transfer?

CodePudding user response:

Project one:

  1. Google Cloud console > firestore > Import/Export > Export

get a export the firestore data into the Storage bucket.

  1. Google Cloud console > Cloud Storage > select bucket

download the export firestore folder

Project two:

  1. Google Cloud console > Cloud Storage > select bucket

upload the export firestore folder

  1. Google Cloud console > firestore > Import/Export > Import

import the firestore data into the Storage bucket.


Does the document ID change after transfer?

Documents ID did not change.

CodePudding user response:

To move Cloud Firestore data from one project to another project you have to follow the following 4 steps -

  1. Create a Cloud Storage bucket to hold the data from your source project

  2. Export the data from your source project to the bucket.

  3. Give your destination project permission to read from the bucket.

  4. Import the data from the bucket into your destination project.

The data in the destination project remains as it is in the source project and specifically to answer your question, the document ID does not change after transfer.

To know the detailed process on how to move Cloud Firestore data from one project to another project you can follow this document.

CodePudding user response:

Firebase Firestore and Google Cloud Firestore are the same thing. Firebase just provided client SDK and has security rules while Google Cloud mostly has server side SDKs. You can view the both Firebase console and Google Cloud console.

Also checkout this article for detailed information.

  • Related