Exporting data from Cloud Firestore to local emulator
Steps to export data from Cloud Firestore to local emulator.
1. Login to Firebase or Google Cloud:
or
2. Connect to your project:
or
3. Export your production data to the Google Cloud storage bucket folder:
4. Copy bucket folder to your local machine:
Now we have production data in our local machine, but we need to make some modifications in order to make it available to emulators. Just follow these three simple steps.
First, switch to the newly created folder:
Rename the metadata file as firestore_export.overall_export_metadata:
And finally, copy all files to .emulator-data/firestore_export
in your workspace folder:
That's it! The next time you run emulators, Firestore will have all the imported data.
PreviousImporting existing data into local emulatorsNextExporting user accounts from Firebase to local emulator
Last updated