Pausing XDCR replication streams
The XDCR CLI provides options to pause and resume replication with couchbase-cli xdcr-replicate.
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 ] KB | Document batch size, 10 to 100000 KB |
--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
--pause
--xdcr-replicator=[REPLICATOR_ID]
-u ADMIN -p PASSWORD
couchbase-cli xdcr-replicate -c HOST:PORT
--resume
--xdcr-replicator=[REPLICATOR_ID]
-u ADMIN -p PASSWORD
Pausing a running replication stream
couchbase-cli xdcr-replicate -c 192.168.0.1:8091 \\
--pause \\
--xdcr-replicator=f4eb540d74c43fd3ac6d4b7910c8c92f/default/default \\
-u Administrator -p password
Resuming a paused replication stream
couchbase-cli xdcr-replicate -c 192.168.0.1:8091 \\
--resume \\
--xdcr-replicator=f4eb540d74c43fd3ac6d4b7910c8c92f/default/default \\
-u Administrator -p password
Updating settings for a replication stream
couchbase-cli xdcr-replicate -c 192.168.0.1:8091 \\
--settings \\
--xdcr-replicator=f4eb540d74c43fd3ac6d4b7910c8c92f/default/default \\
--max-concurrent-reps=32 \\
--checkpoint-interval=1800 \\
--worker-batch-size=500 \\
--doc-batch-size=2048 \\
--failure-restart-interval=30 \\
--optimistic-replication-threshold=256 \\
-u Administrator -p password