firebase-tools icon indicating copy to clipboard operation
firebase-tools copied to clipboard

Allow Firestore emulator to persist data between restarts

Open pmontepagano-dialpad opened this issue 1 year ago • 1 comments

We've recently migrated our database from Datastore to "Firestore in Datastore mode". We now want to stop using the Datastore emulator in our tests and local development environments and instead replace it with the Firestore emulator. In other words, we want to replace gcloud beta emulators datastore start with gcloud emulators firestore start --database-mode=datastore-mode.

But unlike Datastore emulator, the Firestore emulator does not persist data. The documentation states:

Because the emulator stores data only in memory, it will not persist data across runs.

This is an inconvenience for local development environments, where engineers expect state to be persisted across restarts. I would like to request a new flag to the Firestore emulator (at least in Datastore mode) to be able to persist state across restarts (and indicate a path where persistence data should be stored).

pmontepagano-dialpad avatar Jun 27 '24 19:06 pmontepagano-dialpad