Download every entity from every kind...high replication

38 views
Skip to first unread message

GAEfan

unread,
Aug 8, 2011, 11:46:26 AM8/8/11
to Google App Engine
From the docs, I see the following:

"If your app uses the master/slave datastore, you can download and
upload every entity of a kind in a format suitable for backup and
restore.... If your app uses the High Replication datastore, it is not
so simple...

To download all entities of all kinds from an app's master/slave
datastore, run the following command:

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


My question is: What is the similar command for HR datastore? When I
try, I get an error that says I need to specify the Kind argument.
How to get all entities from all Kinds in HR?

Thank you.

GAEfan

unread,
Aug 8, 2011, 2:20:24 PM8/8/11
to Google App Engine
Well, it seemed to have worked this time. In my attempts, I had added
the --config_file=bulkloader.yaml parameter, which was not needed.

So, now I have downloaded the data. I am again stuck at the error:
"app "dev~myapp" cannot access app "myapp"'s data

GAEfan

unread,
Aug 8, 2011, 3:33:54 PM8/8/11
to Google App Engine
OK, I got it to upload to my local development server using the
following command:

appcfg.py upload_data --url=http://localhost:8080/_ah/remote_api --
application=dev~myapp --filename=myapp_data_backup.csv --
num_threads=5

NOTES:

Even though the docs say DO NOT use the --application tag, the only
way to get this to work was to use it, with the dev~ prefix.

Also, I had to add the --num_threads=5 tag to stop a "broken pipe"
error. I have a very fast CPU with many cores, but evidently was
getting some thread collisions. Throttling back to --num_threads=5
(instead of the default 10) seemed to be the only way to fix it.

Hope that helps someone.

Tim Hoffman

unread,
Aug 8, 2011, 7:10:59 PM8/8/11
to google-a...@googlegroups.com
I always run with --num_threads=1 when doing an upload to the dev server, 
remember the dev server is single threaded, so each thread will be waiting on the other threads to finish
before it gets a go.

10 threads mean individual threads are timing out.

T
Reply all
Reply to author
Forward
0 new messages