Dumb way to clone firestore collections
I had one Firebase project using Firestore. But then I wanted to clone my current project so I can use it as the testing environment and futher development.
You have to enable the billing account and set both new/old Firebase project as "Blaze plan". (It won't charge you much unless, you have very huge collections or documents).
- Open the old Firebase project you want to clone.
- Click on Firestore Database (on the left side).
- At the top right corner of the table, select "More in Google Cloud"
- Click on Import/Export
- Click on export to any bucket like staging.*
- After done, on the top left corner, you can see Google Cloud console
- Click on the navigation menu > Cloud Storage > Buckets
- Select on the bucket that you just export to.
- Click on the three dots at the action menu. "Transfer data out"
- Click on destination, select the bucket that belong to the Firebase-testing environment you want to clone to.
- Click "Create" and wait for a while.
- After done you can open the new Firebase project, and click on Firestore Database
- Click on "More in Google Cloud" > "Import/Export"
- Import the destination bucket and files that you transferred out with.
- Once it's done, you can see the success message.
** above is the guide for cloning Firestore database.