I am creating a “pull” replicator document in couchdb 1.1.0:
curl -X PUT http://admin:pass@localhost:5984/_replicator/maintenance -d '
{
"_id": "maintenance",
"source": "http://other.host:5984/maintenance",
"target": "maintenance",
"create_target": true
}'
Now I check the replication state:
curl -X GET http://admin:pass@localhost:5984/_replicator/maintenance
{"_id":"maintenance","_rev":"2-0f25f80a2726640944d527d6035e5b80","source":"http://other.host:5984/","target":"maintenance","create_target":true,"_replication_state":"error","_replication_state_time":"2011-09-06T02:35:10+02:00","_replication_id":"354746bf47831195261bf54f3cb6136b"}
Something is going wrong, but I do not know what. I have even created the database manually, but it is still not working. Any ideas on where the problem could be?
It turns out I was using the wrong url to start the replication. Instead of
I must do:
Now the replication starts as expected. It can even be triggered with create_target and continuous, and it works fine.
I still have some problems though: how can I list the active replications? They are not listed in
localhost:5984/_replicatorand the urllocalhost:5984/_replicateonly acepts POST requests. How can I cancel a continuous replication?And finally: what is the purpose of having two different URLs, one
localhost:5984/_replicateand onelocalhost:5984/_replicator?