Managing XDCR replication streams

Managing XDCR replication streams

The XDCR CLI provides options to manage XDCR replications with couchbase-cli xdcr-replicate .

Description

The following are couchbase-cli xdcr-replicate parameters.

Table 1. xdcr-replicate options
Option Description
--create Create and start a new replication
--delete Stop and cancel a replication
--list List all XDCR replications
--pause Pause the replication
--resume Resume the replication
--settings Update settings for the replication
--xdcr-replicator=REPLICATOR Replication ID
--xdcr-from-bucket=BUCKET Local bucket name to replicate from
--xdcr-cluster-name=CLUSTERNAME Remote cluster to replicate to
--xdcr-to-bucket=BUCKETNAME Remote bucket to replicate to
--max-concurrent-reps =[ 16 ] Maximum concurrent replications per bucket, 8 to 256. Default: 16
--checkpoint-interval =[ 1800 ] Intervals between checkpoints , 60 to 14400 seconds
--worker-batch-size =[ 500 ] Document batch size, 500 to 10000
--doc-batch size =[ 2048 ] kilobytes Document batch size, 10 to 100000 kilobytes
--failure-restart-interval =[ 30 ] Interval for restarting failed XDCR, 1 to 300 seconds
--optimistic-replication-threshold =[ 256 ] Document body size threshold (bytes) to trigger optimistic replication
--xdcr-replication-mode=[xmem | capi] Replication protocol, either capi or xmem

Syntax


couchbase-cli xdcr-replicate -c [host]:[port]
    [option]
    -u [administrator] -p [password]         

        

Example: Starting a replication stream

To start a replication stream:

couchbase-cli xdcr-replicate -c 192.168.0.1:8091 
        --create 
        --xdcr-cluster-name=test 
        --xdcr-from-bucket=default 
        --xdcr-to-bucket=default1
      

Example: Deleting a replication stream

To delete a replication stream:

couchbase-cli xdcr-replicate -c 192.168.0.1:8091 
        --delete 
        --xdcr-replicator=f4eb540d74c43fd3ac6d4b7910c8c92f/default/default
      

Response

Example response: