firebase - gcloud Firestore导出不导出子集合

标签 firebase google-cloud-firestore google-cloud-storage gcloud

我正在运行以下命令来导出我的Firestore集合。

gcloud alpha firestore export gs://[...] --collection-ids='[...]'

导出的结果仅包含根级别的文档,但不包含任何文档下的任何子集合。

如何导出收藏夹中的所有子收藏夹?

我正在关注Google的doc

最佳答案

要备份子集合,我必须指定子集合的集合ID。

gcloud alpha firestore export gs://[...] --collection-ids='[COLLECTION_ID]','[SUB_COLLECTION_ID_1]','[SUB_COLLECTION_ID_2]'

如果不使用--collection-ids选项,它还可以备份整个Firestore,包括所有子集合。但是无法从此备份中导入特定的集合。

关于firebase - gcloud Firestore导出不导出子集合,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51767697/

相关文章:

谷歌云存储的 Android 示例

javascript - 我无法从 firebase 检索用户名

javascript - 无法使用未定义的 Firestore 时间戳 ('toDate')

javascript - 如何获取 firebase 数据库的主要对象?

go - 获取 Firestore 文档的值

firebase - 如何在 Firestore 中保存带有制表符和换行符的文本并完整恢复它?

google-app-engine - 单元测试 Google 的 Cloud Storage API

android - 基于位置的推送通知 FCM

ios - Xcode 10 iOS firebase firestore SDK——多个命令在 Firebase 中产生 gRPCCertificates.bundle 错误

java - 使用 Eclipse 的 GAE 中的 NoClassDefFoundError