couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Couchdb Wiki] Update of "Replication" by RobertNewson
Date Mon, 15 Apr 2013 11:53:17 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification.

The "Replication" page has been changed by RobertNewson:

  === Cancel replication ===
+ ==== Before 1.2.0 ====
  A replication triggered by POSTing to '''/_replicate/''' can be canceled by POSTing the
exact same JSON object but with the additional '''"cancel"''' property set to the boolean
''true'' value.
@@ -61, +63 @@

  Notice: the request which initiated the replication will fail with error 500 (shutdown).
+ ==== from 1.2.0 onward ====
  Starting from CouchDB version 1.2.0, the original replication object no longer needs to
be known. Instead a simple JSON object with the fields '''"replication_id"''' (a string) and
'''"cancel"''' (set to the boolean ''true'' value) is enough. The names ''_local_id'' and
''id'' are aliases to ''replication_id''. The replication ID can be obtained from the original
replication request (if it's a continuous replication), from '''_active_tasks''' or from the
log. Example:
@@ -72, +76 @@

  === Continuous replication ===
  To make replication continuous, add "continuous":true parameter to JSON, for example:
@@ -84, +87 @@

  CouchDB can persist continuous replications over a server restart. For more, see the {{{_replicator}}}
database below.
- === Cancelling a continuous replication task ===
- To cancel a continuous replication task, add "cancel":true parameter to JSON, for example:
- {{{
- POST /_replicate HTTP/1.1
- {"source":"","target":"http://admin:password@",
"continuous":true, "cancel":true}
- }}}
  === Filtered Replication ===
  Sometimes you don't want to transfer all documents from source to target. You can include
one or more filter functions in a design document on the source and then tell the replicator
to use them.

View raw message