【发布时间】:2021-02-26 07:36:27
【问题描述】:
我正在跟进以下文档:
https://cloud.google.com/sdk/gcloud/reference/firestore/import
我正在尝试从今天开始在备份中恢复集合 pets。但是我得到了这个:
# gcloud firestore import gs://pets-backup/2021-02-26T02:27:05_54372/ --collection-ids='pets'
ERROR: (gcloud.firestore.import) INVALID_ARGUMENT: The requested kinds/namespaces are not available
我可以确认gs-bucket 存在并且集合pets 也存在。
这个错误不是很有帮助,我不确定我在处理什么。
我注意到在导出中,有文件夹/all_namespaces/all_kinds。当我尝试直接从这些导入时,我得到:
gcloud firestore import 'gs://pets-backup/2021-02-26T02:27:05_54372/all_namespaces/all_kinds' --collection-ids='pets'
ERROR: (gcloud.firestore.import) NOT_FOUND: Google Cloud Storage file does not exist: /pets-backup/2021-02-26T02:27:05_54372/all_namespaces/all_kinds/all_kinds.overall_export_metadata
我可以看到只有一个文件 all_namespaces_all_kinds.export_metadata 与导入工具正在查找的文件不匹配。
【问题讨论】:
-
您尝试从所有集合的导出中提取此集合的导出?正如您在 documentation 中看到的那样,这是不可能的。
-
不幸的是,是的。这真的不切实际:/
标签: google-cloud-firestore gcloud google-cloud-sdk