firebasefirebase-realtime-databasefirebase-tools

Using the Firebase CLI with a non-default DB


When using Firebase there is a CLI command to get the contents of some collection in a DB.

It goes like this:

firebase database:get /DBPath-tocollection --output myfile.json

and it works very well.

The above works when dealing with the default database.

But here is my question: what is the command to use when dealing with a non-default database ?


Solution

  • According to the documentation on managing multiple Realtime Database instances, you can specify a non-default database by specifying the --instance option to the CLI.