Export firebase

16.5k views Asked by At

I was wondering if it is possible to export firebase data (perhaps as a JSON object) in frequent "cycles". The main reason I'm asking this is because I would like to capture the data at specific points of time in order to perform a range of analytics upon them / identify specific patterns. I'm interested in any operations / methods that are part of the Firebase API - maybe some kind of web hook, or other workarounds that would enable me to do this!

Any suggestions would be greatly appreciated as I could not find anything on the web / docs (maybe I've over read it?).

3

There are 3 answers

3
Andrew Lee On BEST ANSWER

Firebase has a full-featured REST API, so the simplest thing to do is just poll the REST API on a regular basis. REST API docs are here: https://www.firebase.com/docs/rest-api-quickstart.html

You can also get full access to your Firebase data using the Node.js client. This allows you to attach callbacks to your data and act on changes immediately when they occur from your own server: https://www.firebase.com/docs/nodejs-quickstart.html

2
Mathieu Rigard On

You can export firebase data in Json object, just make a curl request like below:

curl 'https://MyBase.firebaseio.com/MyPoint.json?auth=MyAuth&print=pretty'

in linux terminal and you get all your child structure

0
Saeed D. On

Firebase now provides private backup option. For more information checkout private backup for Firebase data.