1

I need to remove a replication document from the replicator db from couchdb, as mentioned by their documents. However I didn't find any sample curl used to delete the replication document. I have tried:

curl -vX DELETE -H "Content-type:application/json" http://localhost:5984/_replicator/33e6ca194de0f30420d15ecfea8b2f21

But the result is:

{"error":"not_found","reason":"missing"}
* Connection #0 to host localhost left intact
* Closing connection #0

What would be the proper curl syntax for deleting the replication document? Thanks in advance.

Jonathan Hall
  • 75,165
  • 16
  • 143
  • 189
y17chen
  • 57
  • 8
  • `33e6ca194de0f30420d15ecfea8b2f21` is the replication_id, i have also tried with the full id: `33e6ca194de0f30420d15ecfea8b2f21+continuous` both didn't work. – y17chen Apr 10 '18 at 23:08
  • Can you post the result of this HTTP request: `GET /_replicator/_all_docs`? – Megidd Apr 11 '18 at 06:01
  • [ { "pid": "<0.25906.12>", "checkpoint_interval": 5000, "checkpointed_source_seq": 16, "continuous": true, "doc_id": null, "doc_write_failures": 0, "docs_read": 4, "docs_written": 4, "missing_revisions_found": 4, "progress": 100, "replication_id": "33e6ca194de0f30420d15ecfea8b2f21+continuous", "revisions_checked": 8, "source": "sessions", "source_seq": 16, "started_on": 1523292052, "target": "https://couchdb:*****@:/sessions/", "type": "replication", "updated_on": 1523294013 } ] – y17chen Apr 11 '18 at 18:01
  • The above is the result from `GET /_active_tasks`. Here is the result from `GET /_replicator/_all_docs`: {"total_rows":1,"offset":0,"rows":[ {"id":"_design/_replicator","key":"_design/_replicator","value":{"rev":"1-5bfa2c99eefe2b2eb4962db50aa3cfd4"}} ]} I'm not able to see the replication task in `_replicator` table, is that expected? – y17chen Apr 11 '18 at 20:12

1 Answers1

0

You can remove a replication document by posting a request to (POST) http://localhost:5984/_replicate The request body looks like

{
    "id": "your_id_with_+continuous",
    "cancel": true
}
Y. Tarion
  • 433
  • 7
  • 17