I want to transfer data from firebase firestore to gcp firestore.
What is the best solution for the this work?
Does the document ID change after transfer?
CodePudding user response:
Project one:
- Google Cloud console > firestore > Import/Export > Export
get a export the firestore data into the Storage bucket.
- Google Cloud console > Cloud Storage > select bucket
download the export firestore folder
Project two:
- Google Cloud console > Cloud Storage > select bucket
upload the export firestore folder
- 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:
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.
CodePudding user response:
To move Cloud Firestore data from one project to another project you have to follow the following 4 steps -
Create a Cloud Storage bucket to hold the data from your source project
Export the data from your source project to the bucket.
Give your destination project permission to read from the bucket.
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.