开发者

Exporting data from dev_appserver

I'm testing a schema change over two versions of my app. I used version 1 to generate test data, and now I'd like to take that data into version 2 to run and test the converter. This is easy enough to do live on appengine, since the datastore stays persistent between versions, but I'm finding that local_db.bin does not survive from one version to the next (maybe this is because the version of the sdk also changes between versions).

I'd like to use appcfg.py to download_data from dev_appserver and then upload_data to the new version, but it seems to be asking me to download each kind of entity individually ("Kind sta开发者_如何学Cts are not available on dev_appserver.").

I can write a script that iterates through all of my kinds to use download_ and upload_data. Is there an easier way to transfer data between instances of the dev server?


One unelegant solution:

bash script to pump data out:

KINDS="Assessment AssessmentScore Course GradingPeriod GradingPolicy OverallGradeDefinition Standard StandardTag User"
for KIND in $KINDS
do
    echo "ugh" | appcfg.py download_data --filename=$KIND --kind=$KIND -email=blagh --url=http://localhost:8888/remote_api --passin --application=myapp
    sleep 5
done

And a corresponding script with upload_data to pump it back in. Getting pretty kludgy when you're using bash to drive python to drive http requests to your java app!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜