Thursday, January 7, 2016

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

Hello,

You can check if the service account is the active one on the instance by running the following command:

 gcloud auth list

If it's not the active account on the instance, then this might be causing your issue.

I hope this helps.

Sincerely,
George


On Tuesday, January 5, 2016 at 7:09:46 PM UTC-5, rcun...@jobutrax.com wrote:
The Cloud SQL instance is First Generation
The GCE instance is running the latest CentOS 6.7


On Tuesday, January 5, 2016 at 5:02:28 PM UTC-7, Vadim Berezniker wrote:
Is this a Second Generation instance?

On Tue, Jan 5, 2016 at 3:53 PM <rcun...@jobutrax.com> wrote:
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.

--
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/16561f70-b65a-472d-8072-64661fc51100%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment