I'm trying to backup GAE datastore to GS bucket as described here: https://developers.google.com/appengine/docs/adminconsole/datastoreadmin#Backup_And_Restore. I've tried to supply bucket name in forms:
bucket
/gs/bucket
/gs/bucket/path
but non of it work. Every time I get a message:
There was a problem kicking some off the jobs/tasks:
Invalid bucket name: 'bucket'
What am I doing wrong? Is it possible at all to backup all data (including blob files) to GS without writing custom code for this?
I got it to work by adding the service account e-mail as a privileged user with write permission.
Here's what I did:
Even thought it was part of the same project, for some reason I still had to add the project e-mail as a privileged user.
I suspect the bucket does not exist or else app engine does not have permission to write to the bucket.
Make sure the following are true:
BUCKET
. Use something like gsutil to create the bucket if necessary.
gsutil mb gs://BUCKET
BUCKET
.
APP_NAME
@appspot.gserviceaccount.com.can edit
access./gs/BUCKET
If you get an Bucket "/gs/BUCKET" is not accessible
message then your bucket does not exist, or [email protected]
does not have access to your bucket.
NOTE: the form is /gs/BUCKET
. The following are wrong: BUCKET, gs://BUCKET, gs/BUCKET etc.
Check that the bucket exists with the right permissions with following command:
gsutil getacl gs://BUCKET # Note the URI form here instead of a path.
Look for an entry like the following:
<Entry>
<Scope type="UserByEmail">
<EmailAddress>[email protected]</EmailAddress>
</Scope>
<Permission>WRITE</Permission>
</Entry>
If you don't see one you can add one in the following manner:
gsutil getacl gs://BUCKET > acl.xml
vim acl.xml # Or your favorite editor
# Add the xml above
gsutil setacl acl.xml gs://BUCKET
Now the steps above will work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With