Thursday, November 10, 2011

Downloading data from GAE

As documented here you can download your data into a blob:

appcfg.py download_data --application=[app-id] --filename=[output dump file] --url=http://[app-id].appspot.com/_ah/remote_api

And then upload to another app:
appcfg.py upload_data --application=[app-id] --kind=[kind] --filename=[input dump file]


Or to work with structured data.

First generate the bulkloader file:

appcfg.py create_bulkloader_config --filename=bulkloader.yaml --url=http://[app-id].appspot.com/_ah/remote_api

Set the connectors to CSV

Download the data:

appcfg.py download_data --application=[app-id] --config_file=bulkloader.yaml --filename=[csv file] --db_filename=progress.sql --kind=[which entity]
--db_filename is important for large uploads to avoid re-uploading the same data

No comments: