首页 > 解决方案 > Scheduling a Cloud DataStore Export in Google Cloud Platform

问题描述

I have followed this tutorial step by step https://cloud.google.com/datastore/docs/schedule-export but I have a problem when I want to assign the Storage Admin role on my bucket with the gsutil command-line tool

gsutil iam ch serviceAccount:YOUR_PROJECT_ID@appspot.gserviceaccount.com:storage.admin \
gs://BUCKET_NAME

I have this error:

BadRequestException: 400 Role roles/storage.storage.admin is not supported for this resource.

However, I can exporting and importing Entities with this commands

gcloud datastore export --namespaces="(default)" gs://${BUCKET}

gcloud datastore import gs://${BUCKET}/[PATH]/[FILE].overall_export_metadata

标签: google-cloud-platformgoogle-cloud-datastoregoogle-cloud-storage

解决方案


将评论转换为答案...

错误消息包含重复storage项:roles/storage.storage.admin

改为调用以下命令(不带.storage字符串)似乎正在工作:

gsutil iam ch serviceAccount:YOUR_PROJECT_ID@appspot.gserviceaccount.com:admin gs://BUCKET_NAME

推荐阅读