question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow emulators to export on exit

See original GitHub issue

Originally requested through FIrebase support, there is some demand for a flag like this:

firebase emulators:start --import=./seed --export-on-exit

This would import from a location but save any mutations made on exit.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:12
  • Comments:19 (12 by maintainers)

github_iconTop GitHub Comments

3reactions
samtsterncommented, Jun 16, 2020

@michi88 thanks for asking all the right questions. My personal take:

  • I like the name --export-on-exit

  • I think it should take an optional path --export-on-exit=./some-path. When unspecified it would use the same path as --import. If you do a bare --export-on-exit with no --import=something flag that’s an error. So:

    • ✅ VALID: emulators:start --import=./foo --export-on-exit
    • ✅ VALID: emulators:start --import=./foo --export-on-exit=./bar
    • ✅ VALID: emulators:start --export-on-exit=./bar
    • ❌ NOT VALID: emulators:start --export-on-exit

If that sounds good to you I’ll propose it to the API people.

1reaction
quantuminformationcommented, Jul 13, 2020

Waiting with anticipation. I didn’t realise that data was not saved automatically after restarting and was wondering what was wrong with my app until I checked the db, I’m glad I’m not crazy.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Firebase Emulator --export-on-exit not working properly ...
Same issue today but on mac. I'm using firebase-tools version 10.7.0. The work around I'm using is to manually run firebase emulators:export ./ ......
Read more >
Install, configure and integrate Local Emulator Suite - Firebase
Instruct the emulator(s) to export data to a directory when shutdown occurs, as described for the emulators:export command. The export directory can be ......
Read more >
How to persist your data with Firebase Emulators - Medium
So to make our life's super easy, simply use the CLI command firebase emulators:start --import <export-directory> --export-on-exit ...
Read more >
Persisting Data on Firebase Emulator - Mukhthar CM
Even though Firebase Emulators Don't have something like Saving Data, Luckily, they Can Export and Import Data. Let's dig into it.
Read more >
Firebase Emulators (Legacy) | OneArmy Community Platform
This can be achieved by passing the --export-on-exit=. ... By default emulators allow full read/write access to all resources, however firebase functions ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found