DESCRIPTION

OPTIONS

Specifies the hostname of a node in the cluster. See the HOST FORMATS
section for more information on specifying a hostname.

-u

--user <username>

Specifies the username of the user executing the command. If you do not have
a user account with permission to execute the command then it will fail with
an unauthorized error.

-p

--password <password>

Specifies the password of the user executing the command. If you do not have
a user account with permission to execute the command then it will fail with
an unauthorized error. If this argument is specified, but no password is
given then the command will prompt the user for a password through
non-echoed stdin. You may also specify your password by using the
environment variable CB_REST_PASSWORD.

--create

Creates a new XDCR replication.

--delete

Deletes an XDCR replication.

--pause

Pauses an XDCR replication.

--list

Lists all XDCR replications.

--resume

Resumes an XDCR replication.

--settings

Sets advanced settings for an XDCR replication.

--xdcr-from-bucket <bucket>

The name bucket to replicate data from.

--xdcr-to-bucket <bucket>

The name bucket to replicate data to.

--xdcr-cluster-name <name>

The name of the cluster reference to replicate to.

--xdcr-replication-mode <mode>

The XDCR replication protocol to use. This can be set to either "capi" or
"xmem".

--filter-expression <regex>

A regular expression used to filter the replication stream.

--filter-skip-restream

With the specified flag, XDCR will remove all checkpoints and restart the
replication such that all mutations that fit the new filter will be
re-replicated to the target.

--xdcr-replicator <id>

The XDCR Replication ID. To get a list of replicator ID’s use the --list
flag.

--checkpoint-interval <seconds>

The interval between checkpoints in seconds. The value of this option must
be between 60 and 14,400.

--worker-batch-size <num>

The worker batch size. The value of this option must be between 500 and
10,000.

--doc-batch-size <kilobytes>

The document batch size in Kilobytes. The value of this option must be
between 10 and 100,000.

--failure-restart-interval <seconds>

Interval for restarting failed XDCR connections in seconds. The value of
this option must be between 1 and 300.

The number of source nozzles to each node in the target cluster. The
value of this option must be between 1 and 10.

--target-nozzle-per-node <num>

The number of outgoing nozzles to each node in the target cluster. The
value of this option must be between 1 and 10.

--bandwidth-usage-limit <num>

The bandwidth limit for XDCR replications in Megabytes per second for this
replication.

--enable-compression <num>

Specifies whether or not XDCR compression is enabled. Set this option to
"1" to enable compression or "0" to disable compression. This feature is
only available in Couchbase Enterprise Edition and can only be used where
the target cluster supports compression.

--log-level <level>

The XDCR log level.

--stats-interval <milliseconds>

The interval for statistics updates in milliseconds.

--priority <High|Medium|Low>

Specify the priority for the replication. The options are High, Medium or
Low. The default priority is High.

--reset-expiry <1|0>

When set to true, all mutations sent to the target cluster will have the
expiration set to zero. This means documents will not expire in target
cluster. This can be overridden by setting max-ttl on the target bucket.

--filter-deletion <1|0>

When set to true, delete mutations will not be sent to the target cluster.
This means documents will not be deleted in the target cluster via delete
operations on the source cluster.

--filter-expiration <1|0>

When set to true, expiry mutations will not be sent to the target cluster.
This means documents will not be deleted in the target cluster via
expirations on the source cluster.

HOST FORMATS

When specifying a host for the couchbase-cli command the following formats are expected:

couchbase://<addr>

<addr>:<port>

http://<addr>:<port>

It is recommended to use the couchbase://<addr> format for standard
installations. The other two formats allow an option to take a port number which
is needed for non-default installations where the admin port has been set up on
a port other that 8091.

EXAMPLES

To create a new XDCR replication from the "default" bucket to the "apps" bucket
on a remote cluster called "east" using the xmem replication protocol. You can
run the following command below. Note that if you have not setup a remote
cluster reference then you need to do this first by running the
xdcr-setup.

To delete an XDCR replication you first need to use the --list flag to get the
replicator id. Once you get the replicator id (in this case we will assume it is
f4eb540d74c43fd3ac6d4b7910c8c92f/default/default) you can run the command below
to delete the replication.

To pause an XDCR replication you first need to use the --list flag to get the
replicator id. Once you get the replicator id (in this case we will assume it is
f4eb540d74c43fd3ac6d4b7910c8c92f/default/default) you can run the command below
to pause the replication.

To resume an XDCR replication you first need to use the --list flag to get the
replicator id. Once you get the replicator id (in this case we will assume it is
f4eb540d74c43fd3ac6d4b7910c8c92f/default/default) you can run the command below
to resume the replication.

To modify the settings of an XDCR replication you first need to use the --list
flag to get the replicator id. Once you get the replicator id (in this case we
will assume it is f4eb540d74c43fd3ac6d4b7910c8c92f/default/default) you can run
the command if for example you wanted to change the document batch size to 2048
and failure restart interval to 60 seconds.

ENVIRONMENT AND CONFIGURATION VARIABLES

Specifies the username to use when executing the command. This environment
variable allows you to specify a default argument for the -u/--username
argument on the command line.

CB_REST_PASSWORD

Specifies the password of the user executing the command. This environment
variable allows you to specify a default argument for the -p/--password
argument on the command line. It also allows the user to ensure that their
password are not cached in their command line history.