How do I only export January subcollection?
You can filter specific collections by using the collection-id
flag. Following the link you've already provided, you can follow the command that was provided:
gcloud firestore export gs://[BUCKET_NAME] --collection-ids=[COLLECTION_ID_1],[COLLECTION_ID_2]
Just a note, using collection-id
flag is used to import specific collection groups from a set of export files, and if there's a collection that you don't want to export, you can exclude them from the export operation by using the flag.
Additionally, if you want to backup the whole collection and its sub collections without using the collection-id
flag, you can use collection group query which retrives all the documents from a collection group instead from a single collection. There's also a related post that has a good answers on how to fecth all documents from a Firebase collection using collection group query
.