Created
November 29, 2012 00:26
-
-
Save luk-/4165831 to your computer and use it in GitHub Desktop.
couch db replication using /_replicator db instead of /_replicate endpoint
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"_id": "whatever", | |
"source": "http://some.couch.url/dbname", | |
"target": "local_dbname", | |
"continuous": true, | |
"user_ctx": { | |
"name": "user", | |
"roles": [ | |
"_admin" | |
] | |
} | |
} |
Unlike when you POST
to the /_replicate
endpoint, where you can add a "cancel": "true"
property to end replication, this replication is canceled by DELETE
-ing the doc created in the /_replicator
db.
Note: you cannot directly alter documents in /_replicator
with {"status": "triggered"}
. Delete and recreate the document.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
note: must have roles array with "_admin" in order to replicate views.