I want to backup a specific firestore collection and all its nested sub-collections to cloud storage daily. I haven't found anything that export all its nested sub-collections yet. Please help. our firebase hosts for multiply projects. each projects have their own root level collection. When I export, I only want to export the collections related to one particular project. I don't want to export collections from other projects. The challenge is these projects may have some same sub-collection id, for example, each projects have their own users collection.
1
votes
Is there a reason the export functionality doesn't do what you want? (possibly using the api if you need to wrap it in more custom code to trigger).
- robsiemb
that export functionality only exports direct children, not nested sub-collectons. I was looking at the api you mentioned. Didn't quite figure out how to achieve what I want. I didn't find examples on those APIs.
- Lei Wang
Huh, I guess the documentation could be read that way too, I saw "The operation exports only the collection groups with the given collection IDs. The collection group includes all collections and subcollections (at any path) with the specified collection ID." and figured it did what you needed. Certainly could be clearer.
- robsiemb