Skip to content

Export database from Google App Engine via Python SDK

Ujali edited this page Mar 25, 2015 · 1 revision

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 :-

  1. Download the Google app engine Python SDK from here (cloud.google.com/appengine/downloads).

  2. Create new bulk loader file with the command :-

python ./bulkloader.py - -create_config - -url applicationName.appspot.com/remote_api - -filename generateBulkloader.yaml

  1. 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
  1. Customize the generateBulkLoader.yaml with these constraints :-

    - kind: Audit
        connector: csv
        connector_options:
            encoding: utf-8
  2. 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

Clone this wiki locally