How do I build a stage version of my Firebase app?

Hi all, I’ve built a web app with firebase and I am really struggling with how to get a staging version of the app deployed. Here is my situation

• I have an app called MyApp, it has auth users, a couple of collections in Firestore and some files in storage
• I want to clone this entire app into MyAppDev
• I do not need to use Firebase hosting, I will host my web app elsewhere
I want to do this so I can deploy two versions of my app to different domains like <http://staging.my-awesome-app.com|staging.my-awesome-app.com> and <http://my-awesome-app.com|my-awesome-app.com> and the only difference between these would be credentials in the environment variables.

Can anyone point me to the best way to do this?

Let me refine this a bit… my app is actually a firebase project and I want to clone this into a new firebase project, so that the products (firestore/storage) are not shared

Look into backup/restore CLI commands

Is this in firebase tools?

I made a backend service using cloud functions to replicate data.
I also have two firebase projects, one is for staging, other is prodcution.

This is just my experience.

I am not sure if there are the best solution.

So far the experience with firebase has been great until I got to this - this part of the experience is absolutely terrible

I guess the CLI should help me out a bit… although can’t find backup/restore in the CLI docs just yet

can you share a reference link to backup or restore?

https://firebase.google.com/docs/firestore/manage-data/export-import

https://firebase.google.com/docs/cli/auth#auth-import

These are docs for two different things tho right?

One is for gcloud the other is for firebase tools?

https://stackoverflow.com/questions/54173698/firestore-and-storage-bucket-export-import-between-projects

Thanks for your sharing.

I wouldnt really be bothered about storage

As you can point to different storage bucket

So you can just have different set of data

Easiest is i guess to dump firestore…and keep all stuff in emulator until is ready