我想复制CouchDB数据库https://github.com/kirel/detexify-data
可悲的是,我收到了一个错误:
$ curl -X POST -H "Content-Type:application/json" -d '{"source":"https://kirelabs.cloudant.com/detexify","target":"detexify"}' http://localhost:5984/_replicate
{"error":"checkpoint_commit_failure","reason":"Failure on source commit: {error,<<\"unauthorized\">>}"}
这似乎是以下错误:https://issues.apache.org/jira/browse/COUCHDB-1524
有人可以告诉我是否有解决方法吗?我怎样才能获得数据?
$ curl -X POST -H "Content-Type:application/json" \
-d '{"source":"https://kirelabs.cloudant.com/detexify",
"target":"detexify",
"use_checkpoints":false}'
http://localhost:5984/_replicate
{"error":"checkpoint_commit_failure",
"reason":"Failure on source commit: {error,<<\"unauthorized\">>}"}
答案 0 :(得分:0)
快速简便的解决方案是不使用检查点。
{"source":"https://kirelabs.cloudant.com/detexify","target":"detexify","use_checkpoints":false}
我尝试使用此请求并设法复制您的数据。
更新
我再试一次,复制似乎对我来说很好。我在取消复制之前复制了22.7 MB的数据。我附上了截图。
curl -X POST -H "Content-Type:application/json" -d '{"source":"https://kirelabs.cloudant.com/detexify",
"target":"detexify",
"use_checkpoints":false,"create_target":true}' http://ABBA:dancing-queen@localhost:5984/_replicate
复制命令从您更新的示例中逐字复制,但“本地数据库”中的“create_target”选项和管理员基本身份验证除外。