Tuesday, January 5, 2016

[google-cloud-sql-discuss] Attempting to export Cloud SQL db from GCE instance throws permission error

I am trying to export my Cloud SQL database to my storage bucket when executing from a GCE instance, however I always seem to get the error "ERROR: (gcloud.sql.instances.export) Insufficient Permission". My command:

gcloud sql instances export my_cloudsql_name gs://my_bucket/backup.sql.gz --database my_db

I have enabled the Google Cloud Storage API and the Cloud SQL API and added the scopes compute-rw, sql-admin, storage-full. I have even gone as far as giving full access on all available scopes, but I still get the error. However, it seems to work ONLY if I use the cloud-platform scope, which is the "Allow API access to all Google Cloud services in the same project" checkbox. But it has to be that...I have no success manually selecting any scope permissions.

Is this intended or is there an issue here? I would be great to be able to export the database without exposing access to every API.

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/4997e8b1-8ecf-4f39-b79f-af87e556f420%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment