How can I export data from Google App Engine High Replication datastore?

后端 未结 3 1812
隐瞒了意图╮
隐瞒了意图╮ 2021-01-19 01:56

I am looking into using Google App Engine for a project and would like make sure I have a way to export all my data if I ever decide to leave GAE (or GAE shuts down).

3条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-19 02:21

    It took me quite a long time to setup the download of data from GAE as the documentation is not as clear as it should be.

    If you extracting data from a Unix server, you maybe could reuse the script below.

    Also, if you do not provide the "config_file" parameter, it will extract all your data for this kind but in a proprietary format which can only be used for restoring data afterwards.

    #!/bin/sh
    #------------------------------------------------------------------
    #-- Param 1 : Namespace
    #-- Param 2 : Kind (table id)
    #-- Param 3 : Directory in which the csv file should be stored
    #-- Param 4 : output file name
    #------------------------------------------------------------------
    appcfg.py download_data --secure --email=$BACKUP_USERID --        config_file=configClientExtract.yml --filename=$3/$4.csv --kind=$2 --url=$BACKUP_WEBSITE/remote_api --namespace=$1 --passin <<-EOF $BACKUP_PASSWORD EOF
    

提交回复
热议问题