-
Notifications
You must be signed in to change notification settings - Fork 1
Export database from Google App Engine via Python SDK
Recently we have encountered a scenario in which we were required to export our Google App Engine database.
Following are the steps to download database from Google App Engine :-
-
Download the Google app engine Python SDK from here (cloud.google.com/appengine/downloads).
-
Create new bulk loader file with the command :-
python ./bulkloader.py - -create_config - -url applicationName.appspot.com/remote_api - -filename generateBulkloader.yaml
-
The generateBulkloader.yaml would contain structure of database table ,Here we have shown Audit table as example, in following format :-
transformers:
- kind: Audit connector: #TODO: Choose a connector here: csv, simplexml, etc... connector_options: #TODO: Add connector options here--these are specific to each connector. property_map: property: __key__ external_name: key export_transform: transform.key_id_or_name_as_string property: checkedIMEI external_name: checkedIMEI Type: String Stats: 13083 properties of this type in this kind. property: timestamp external_name: timestamp Type: String Stats: 13083 properties of this type in this kind
-
Customize the generateBulkLoader.yaml with these constraints :-
- kind: Audit connector: csv connector_options: encoding: utf-8
-
Export or download the database into csv format with following command :-
python ./bulkloader.py - -download - -url applicationName.appspot.com/remote_api - -config_file generatedBulkloader.yaml - -kind Audit - -filename download_audit.csv