Firestore Emulator - Force-export on Demand

I am using Firestore emulator on Windows within a mono-repo set up with turbo.

The firestore emulator is run using,

firebase emulators:start --only auth,firestore,functions,storage --import .firebase --export-on-exit

But constantly, when I use Ctrl-C to terminate the process, it DOES NOT EXPORT. I lose everything, and when I go to test again, I have to manually go through the setup process all over again, which is a tedious waste of time and is getting to be infuriatingly frustrating.

This is apparently a known issue with the mono-repo setup, because the process is controlled by a parent process that terminates it before it's done. (https://stackoverflow.com/questions/71972842/firebase-emulator-export-on-exit-not-working-properly-w...)

So, with that said, how can I force Firestore emulator to export data BEFORE it exits? As in, on-demand? Is there any plugin or nodejs package that would back up the documents to maybe an emulated bucket or basic file, that would re-import them on launch?

TIA

0 0 33
0 REPLIES 0