appcfg.py: 错误:没有这样的选项:--dump 在google-app-engine上
可能重复的问题:
我该如何使用Google App引擎的批量加载器来备份我的所有数据?
我按照这篇文章的步骤操作:http://code.google.com/intl/en/appengine/docs/python/tools/uploadingdata.html
我想从我的应用程序中下载所有数据,
但是当我使用下面的代码时,出现了错误:
D:\zjm_demo\app>appcfg.py --dump --app_id=zjm1126 --url=http://zjm1126.appspot.c
om/remote_api --filename=a.csv
Usage: appcfg.py [options] <action>
appcfg.py: error: no such option: --dump
这是为什么呢?
谢谢!
更新
我使用的是这个:
appcfg.py download_data --application=zjm1126 --url=http://zjm1126.appspot.com/remote_api --filename=a.csv
3 个回答
0
使用 appcfg.py 下载数据,命令格式是:在“应用程序目录”后面加上你的应用 ID,然后再加上配置文件等信息。具体来说,你需要输入以下内容:--config_file=etc.yaml 表示使用的配置文件是 etc.yaml,--kind=etc 表示你要下载的数据类型是 etc,--filename=etc.csv 表示下载的数据会保存为 etc.csv 这个文件。
0
我没有“为什么”的答案,但我觉得你可能想用 download_data
这个操作。
> appcfg help download_data
Usage: appcfg.py [options] download_data <directory>
Download entities from datastore.
The 'download_data' command downloads datastore entities and writes them to
file as CSV or developer defined format.
...
你可能想看看 配置批量加载器 这一部分,里面有更多信息。我自己从来没有需要下载数据的情况,所以对这方面没有实际经验。
1
这个文档好像写错了:
我发现我需要用 download_data 而不是 --dump,用 --application 而不是 --app_id,比如:
appcfg.py download_data --application=app_id --url=http://etc --filename=file
这和 我该如何使用 Google App 引擎的批量加载器来备份我的所有数据? 是重复的问题。