无法导出Firestore数据库

时间:2018-08-14 06:40:52

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

我正在尝试link所示的FireStore的新导出功能,并且不断收到错误消息:

gcloud alpha firestore export gs://backup --async

ERROR: (gcloud.alpha.firestore.export) PERMISSION_DENIED: Service account does not have access to Google Cloud Storage file: /backup. See https://cloud.google.com/datastore/docs/export-import-entities#permissions for a list of permissions needed. Error details: projectABC@appspot.gserviceaccount.com does not have storage.buckets.get access to backup.

我已经运行了将服务帐户添加为storage.admin的命令,该命令成功了:

gcloud projects add-iam-policy-binding projectABC --member='serviceAccount: projectABC@appspot.gserviceaccount.com' --role='roles/storage.admin'

有人可以帮忙吗?

2 个答案:

答案 0 :(得分:3)

您不能为备份选择任意存储桶名称。您正在使用“ gs:// backup”。相反,您需要使用网址来创建完全由您控制的实际存储桶。

答案 1 :(得分:-1)

授予存储管理员访问IAM角色的权限