couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Couchdb Wiki] Update of "Replication" by JanLehnardt
Date Mon, 23 Mar 2009 15:45:56 GMT
Dear Wiki user,

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

The following page has been changed by JanLehnardt:
http://wiki.apache.org/couchdb/Replication

The comment on the change is:
more replication docs

------------------------------------------------------------------------------
  
  The replication process only copy the last revision of a document, so all previous revisions
that were only on the source database are not copied to the destination database.
  
- == Actual limitations ==
  
- For the moment, replication will break if authentication is used on destination database
(work is in progress to solve this issue)
+ === Run Replication ===
  
+ Replication is triggered by sending a POST request to the `_replicate` URL with a JSON object
in the body that includes a `source` and a `target` member.
+ 
+ 
+ {{{
+ POST /example-database/_replicate HTTP/1.1
+ 
+ {"source":"/example-database","target":"http://example.org/example-database"}
+ }}}
+ v
+ `source` and `target` can both point at local databases, remote databases and any combination
of these.
+ 
+ If your local CouchDB instance is secured by an admin account, you need to use the full
URL format
+ 
+ {{{
+ POST /example-database/_replicate HTTP/1.1
+ 
+ {"source":"http://admin:password@127.0.0.1:5984/example-database","target":"http://example.org/example-database"}
+ }}}
+ 
+ The target database has to exist and is not implicitly created. The names of the source
and target databases do not have to be the same.
+ 
+ 
+ Specifying a local `source` database and a remote `target` database is called ''push replication''
and a remote `source` and local `target` is called ''pull replication''. As of CouchDB 0.9,
pull replication works a lot more efficient and error resilient and it is suggested that you
use pull replication in most cases, especially if your documents are large or you have large
attachments.
+ 

Mime
View raw message