Separate dev and prod Firebase environment

I'm not currently using Firebase, but considering it like yourself. Looks like the way to go is to create a completely separate project on the console. There was a blogpost up recommending this on the old Firebase site, looks to be removed now though. https://web.archive.org/web/20160310115701/https://www.firebase.com/blog/2015-10-29-managing-development-environments.html

Also this discussion recommending same: https://groups.google.com/forum/#!msg/firebase-talk/L7ajIJoHPcA/7dsNUTDlyRYJ


As everyone has pointed out - you need more than one project/database.

But to answer your question regarding the need to be able to copy settings/data etc from development to production. I had the exact same need. A few months in development and testing, I didn't want to manually copy the data.

My result was to backup the data to a storage bucket, and then restore it from there into the other database. It's a pretty crude way to do it - and I did a whole database backup/restore - but you might be able to look in that direction for a more controlled way. I haven't used it - it's very new - but this might be a solution: NPM Module firestore-export-import

Edit: Firestore backup/export/import info here Cloud Firestore Exporting and Importing Data

If you're using Firebase RTDB, and not Firestore - this documentation might help: Firebase Automated Backups

You will need to set the permissions correctly to allow your production database access to the same storage bucket as your development. Good luck.


If you are using firebase-tools there is a command firebase use which lets you set up which project you are using for firebase deploy

firebase use --add will bring up a list of your projects, select one and it will ask you for an alias. From there you can firebase use alias and firebase deploy will push to that project.

In my personal use, I have my-app and my-app-dev as projects in the Firebase console.