How to download all datastore entities on Google App Engine?

醉酒当歌 提交于 2019-12-12 07:25:55

问题


I've read the GAE docs, and I can't seem to figure out how to download all my entity data.

What I'd love to do is download the whole thing as a big TSV file (or something I can easily munge into one), so I can import my various entities into a spreadsheet and fiddle with them.

But I'm stuck at the starting gate. I don't understand the first few bits of the docs: "This document applies to apps that use the master/slave datastore. If your app uses the High Replication datastore..." -- I'm not even sure which I have, or how I would tell.

Assuming I have the simpler master/slave, the docs continue: "...you can use the Python appcfg.py tool by installing the Java version of the remote_api handler..." but, again, I'm not quite sure what they mean or where I find this appcfg.py tool.

Sorry for such a n00b question, but is there some sort of walk-through? I just want to download my datastore!

Thanks!


回答1:


Master/Slave is the default (for now), so that's almost certainly what you're using. You can confirm at https://appengine.google.com/ -> app-id -> Administration -> Application Settings -> Datastore Replication Options.

To download your data, first install Remote API for Java, then use appcfg.py to download data:

appcfg.py download_data --application=<app-id> --url=http://<appname>.appspot.com/[remote_api_path] --filename=<data-filename>



回答2:


There is nothing you need to do other than just follwiong the google's own documentaion. There is no workaround or walkthrough. I am not sure about java. In python , only thing you need to do is enable remote_api in your app.yaml.

appcfg.py can be found inside the root directory of appengine SDK.



来源:https://stackoverflow.com/questions/6133918/how-to-download-all-datastore-entities-on-google-app-engine

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!