Thursday, January 28, 2016

Re: [google-cloud-sql-discuss] Importing an export of an sql instance fails via command line, succeeds via cloud console

The service account has read permission on the bucket but not on the object. Bucket read allows you to list objects but you need object read to access their contents. Try running 'gsutil acl -u <service-acct>:r <object>'. If you set the default object acl then new objects will have the permission automatically.

David



On Thu, Jan 28, 2016 at 11:42 AM, <bjorn@otainsight.com> wrote:
The EmailAddress from the output already had read permissions for the bucket.
Thanks for your help.

On Thursday, 28 January 2016 18:57:21 UTC+1, David Newgas wrote:
In fact, could you run "gcloud sql instances describe <target instance>" and note the serviceAccountEmailAddress in the output. Try granting that email address read access to your object and then importing again (rather than making the object public). I'm going to check in with the Cloud SQL team whether this is supposed to be necessary and whether we are missing it from our docs.

On Thu, Jan 28, 2016 at 9:50 AM, David Newgas <dne...@google.com> wrote:
Hi,

I suspect this is a issue with a Second Generation instances not having permissions to access the data in GCS. If acceptable security-wise, could you see if you can import from a publicly accessible object?

Also please note that if you need to load the data urgently you will be able to do so (but slower and at higher cost) by downloading the file to your workstation and loading it with a remote MySQL connection.

David

On Thu, Jan 28, 2016 at 1:08 AM, <bj...@otainsight.com> wrote:
When I try to import an export of an sql instance via the command line, I get the following output:
Importing Cloud SQL instance...failed,
ERROR: (gcloud.sql.instances.import) UNKNOWN

The command I use is: 

> gcloud sql instances import <target instance> gs://<mybucket>/<file.gz>


However, when I import the file to the target instance using the cloud console, I don't get any errors.


--
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/8cd8147b-488a-4dd4-96e6-f05ebeaa3ec1%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/2a082ced-7169-40ea-9775-9c9247df3ffa%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/CAJZK_bY8JQogYaSKqhtc1y07MYq8Ji9xRSmEMZz5OAfaQZWfhQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment