Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Export json from Firestore

As we can download json file at Firebase RTDB console, are there any way to export json file of Firestore collection/document data?

One of my main objectives is to compare data before/after updating document.

like image 834
miz-k Avatar asked Oct 07 '17 07:10

miz-k


People also ask

Does firestore use JSON?

Note: Cloud Firestore supports a variety of data types for values: boolean, number, string, geo point, binary blob, and timestamp. You can also use arrays or nested objects, called maps, to structure data within a document. You may notice that documents look a lot like JSON. In fact, they basically are.

How do I export firestore index?

It's possible! Run from CLI firebase firestore:indexes inside your firebase project folder. Providing you have indexes already setup and logged into Firebase via the CLI too, you'll get a formatted JSON output for you to copy. Exported indexes can be re imported using firebase deploy --only firestore:indexes .


1 Answers

I just wrote a backup and restore for Firestore. You can have a try on my GitHub.

https://github.com/dalenguyen/firestore-backup-restore

Thanks,

like image 54
Dale Nguyen Avatar answered Sep 18 '22 08:09

Dale Nguyen