简体   繁体   中英

Transfer data from firebase firestore to gcp firestore

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?

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.

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.

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM