2

我能够下载我的生产 GAE 数据存储的备份,但我无法将备份上传到我的开发应用程序。这是我的尝试:

从生产中下载商店,按预期工作:

appcfg.py download_data --application=s~myApp --url=http://myApp.appspot.com/_ah/remote_api --filename=backup1

将备份上传到开发存储,失败:

appcfg.py upload_data --application=dev~myApp  --url=http://localhost:8080/_ah/remote_api --filename=backup1
Uploading data records.
[INFO    ] Logging to bulkloader-log-20120823.225047
[INFO    ] Throttling transfers:
[INFO    ] Bandwidth: 250000 bytes/second
[INFO    ] HTTP connections: 8/second
[INFO    ] Entities inserted/fetched/modified: 20/second
[INFO    ] Batch Size: 10
[INFO    ] Opening database: bulkloader-progress-20120823.225047.sql3
Please enter login credentials for localhost
Email: myemail@gmail.com
Password for myemail@gmail.com: 
[INFO    ] Connecting to localhost:8080/_ah/remote_api
[INFO    ] Starting import; maximum 10 entities per post
............................................................................................................................................................[INFO    ] Unexpected thread death: WorkerThread-5
[INFO    ] An error occurred. Shutting down...
.........[ERROR   ] Error in WorkerThread-5: <urlopen error [Errno 61] Connection refused>

[INFO    ] 2670 entities total, 0 previously transferred
[INFO    ] 1650 entities (1207416 bytes) transferred in 431.1 seconds
[INFO    ] Some entities not successfully transferred

似乎错误 61 是一个端口错误。该应用程序正在运行,我已通过浏览器以管理员身份登录,并且我还输入了我的电子邮件/密码作为 CLI 命令的一部分。有些记录总是被上传,然后上传过程被切断。

4

1 回答 1

1

我一直发现将数据上传到本地数据存储更可靠,将线程数设置为 1。请记住,开发服务器本质上是单线程的。尝试使用--num_threads=1.

我还建议设置--db_filename=DB_FILENAME创建一个进度数据库,这意味着如果失败,您可以从它到达的位置重新启动。

在尝试编写大型实体时,我有时也不得不减少批量大小。

干杯

于 2012-08-25T00:25:33.633 回答