Reputation: 2989
According to the documentation, it is said:
You can go to your Firebase App Dashboard and export all of your data in JSON format. You can also export it via the REST API:
curl "https://<YOUR-FIREBASE-APP>.firebaseio.com/.json?print=pretty&auth=<YOUR-FIREBASE-APP-SECRET>"
However, when i use this in terminal, it all printed out inside the terminal and part of it did not show up because terminal only show limited lines.
Is there any way I can export data from firebase to a file?
Thanks!
Upvotes: 2
Views: 3217
Reputation: 3139
Here is the solution that worked for me.
curl "https://<YOUR-FIREBASE-APP>.firebaseio.com/.json?print=pretty&auth=<YOUR-FIREBASE-APP-SECRET> > [json-file-name].json"
Example:
curl 'https://proj-name.firebaseio.com/repository/users.json?print=pretty' > data.json
Upvotes: 1