How to migrate data & settings from one firebase to another?

前端 未结 5 1800
盖世英雄少女心
盖世英雄少女心 2020-12-14 10:43

Are there any tools to aid in data migration from dev to staging to prod? If not, are there plans to build them?

I know you can Export JSON and Import JSON from Forg

5条回答
  •  甜味超标
    2020-12-14 11:24

    What Andrew said above is mostly correct, however this can be a pain with large firebases. There is an import project at https://github.com/firebase/firebase-import that will help import large firebases by breaking up the put requests. Also something to note, you will need to use quotes around the curl url, otherwise the & will background the process. So what Andrew gave above will work instead as

    curl -o outputfile.json "https://myapp.firebaseIO.com/.json?format=export&auth=YOUR_FIREBASE_SECRET"

    Then you can use the import module I linked with that json file.

    Good Luck!

提交回复
热议问题