Gcloud Firestore emulators lost the data when restart

Viewed 854

I'm using firestore emulator for my python project.

I start it using this command.

gcloud beta emulators firestore start --host-port=localhost:8080

After saving docs and doing other stuff if I close the firestore and run it again it will lose all data. I want firestore keep data until I clear data myself, is it possible ?

1 Answers

It sounds like you're looking for:

  • emulators:export to export data from the emulator
  • the --import flag to pass the exported data to the emulator on startup

Also see the Firestore documentation on exporting and importing emulator data.

Related