Datastore Admin backup.create

287 views
Skip to first unread message

Moises Belchin

unread,
Dec 11, 2012, 12:35:32 PM12/11/12
to Google App Engine
In my app.yaml I have this:

- url: /_ah/datastore_admin.*
   script: google.appengine.ext.datastore_admin.main
   login: admin

And I try to urlFetch this url:


However on my logs I get always 302 and need login.

Anyone knows how to urlFetch datastore admin backup create to make scheduled backups for all our kinds ? 

Thanks and regards.
Moisés Belchín.

Arie Ozarov

unread,
Dec 11, 2012, 7:33:52 PM12/11/12
to google-a...@googlegroups.com
Any reason you are not using Cron for that? https://developers.google.com/appengine/articles/scheduled_backups
I think the authentication need should not be a problem if you submit your request using a taskqueue rather than urlfetch.
e.g:
 taskqueue.add(url='/_ah/datastore_admin/backup.create', params={'kind':'MyKind', 'queue':'backup', ...})
Also, when you do that you can specify a "target" to "ah-builtin-python-bundle" and then your app.yaml changes are not be needed.

Moises Belchin

unread,
Dec 12, 2012, 4:07:04 AM12/12/12
to Google App Engine
Thanks for the answer, I'll try taskqueue

I want to use only one cron for backup all my entities instead of create one cron per kind.

Thanks again


Saludos.
Moisés Belchín.



2012/12/12 Arie Ozarov <oza...@google.com>
--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/AYKGn_tRrMUJ.
To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.

Moises Belchin

unread,
Dec 12, 2012, 5:13:24 AM12/12/12
to Google App Engine
Thanks so much for the answer It works perfect !

Regards


Saludos.
Moisés Belchín.



2012/12/12 Arie Ozarov <oza...@google.com>
Any reason you are not using Cron for that? https://developers.google.com/appengine/articles/scheduled_backups

Arie Ozarov

unread,
Dec 12, 2012, 12:29:29 PM12/12/12
to google-a...@googlegroups.com
Glad to hear.
BTW, when using the standard scheduled backup via CRON you can backup more than one kind by providing multiple kind=kind1&kind=kind2&...&kind=kindN in the URL (see the "url" description in the document).

Arie.

Moises Belchin

unread,
Dec 13, 2012, 4:10:37 AM12/13/12
to Google App Engine
Yeah ! Thanks.

I saw it, however we want to automatically backup all Kinds and we want forget to add new Kinds to cron backup.


Saludos.
Moisés Belchín.



2012/12/12 Arie Ozarov <oza...@google.com>
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/bFxm6MCh4ZsJ.

Arie Ozarov

unread,
Apr 9, 2013, 8:28:35 PM4/9/13
to google-a...@googlegroups.com
Associating 'kind' param with a list/tuple should work as well.
e.g:
 taskqueue.add(url='/_ah/datastore_admin/backup.create', params={'kind': ('MyKind1', 'MyKind2'), 'queue':'backup', ...})

On Monday, April 8, 2013 7:45:50 AM UTC-7, Gwyn Howell wrote:
how can you use this method if specifying more than 1 kind? as the params is a dict so you can only have 1 kind key. what if you need multiples?

Gwyn Howell

unread,
Apr 10, 2013, 3:06:51 AM4/10/13
to google-a...@googlegroups.com
yeah your right i figured it out as well. thanks


--
You received this message because you are subscribed to a topic in the Google Groups "Google App Engine" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-appengine/PxtYUrQpvjs/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to google-appengi...@googlegroups.com.

To post to this group, send email to google-a...@googlegroups.com.



--

Best regards,

Gwyn Howell
Lead Developer

T: 01344 203415
T: 0845 2626 747 (switchboard)

F: 0845 2626 748
E: gho...@ancoris.com
W: www.ancoris.com

Ancoris Limited, Lily Hill House, Lily Hill Road, Bracknell, Berkshire RG12 2SJ


This e-mail message has been scanned and cleared by Postini / Google Message Security. This message is for the named person's use only. If you receive this message in error, please delete it and notify the sender. Ancoris reserves the right to monitor all e-mail communications through its networks. Ancoris Limited, Registered in England Number: 04830784, Registered address: 5a Frascati Way, Maidenhead, Berkshire SL6 4UY. Trading Address: Lily Hill House, Lily Hill Road, Bracknell, Berkshire RG12 2SJ


Reply all
Reply to author
Forward
0 new messages