Firestore Emulator Load Data


Getting data from Firestore in the cloud to local can be done using a paid app such as FireFoo or from the command line using the cli tools provided by Google.

I’ll assume you have the firebase CLI installed as you have the emulator already. The gcloud tools are available for nearly all platforms.

Once you have them setup, run the initialization

firebase login
gcloud auth login

Make sure you are using the right projects. For firebase you are most likely setup but you can check with

firebase projects:list
firebase use your-project-name

The command for gcloud are similar

gcloud projects list
gcloud config set project your-project-name

now do a backup if you have not already

gcloud firestore export gs://

cd into a temp folder and download with a copy command.

gsutil -m cp -r gs:// .

Make sure the emulator is not running and copy those contents to over the existing files in you emulator folder.