Server nodes
To set a data path for an unprovisioned cluster:
couchbase-cli node-init -c 192.168.0.1:8091 \
--node-init-data-path=/tmp/data \
--node-init-index-path=/tmp/index
To list servers in a cluster:
couchbase-cli server-list -c 192.168.0.1:8091
Retrieving server information
couchbase-cli server-info -c 192.168.0.1:8091
Adding nodes to clusters
The following example adds a node to a cluster but does not rebalance:
couchbase-cli server-add -c 192.168.0.1:8091 \
--server-add=192.168.0.2:8091 \
--server-add-username=Administrator \
--server-add-password=password
The following example adds a node to a cluster and rebalances:
couchbase-cli rebalance -c 192.168.0.1:8091 \
--server-add=192.168.0.2:8091 \
--server-add-username=Administrator \
--server-add-password=password
Removing nodes
The following example removes a node from a cluster and rebalances:
couchbase-cli rebalance -c 192.168.0.1:8091 \
--server-remove=192.168.0.2:8091
The following example removes and adds nodes from/to a cluster and rebalances:
couchbase-cli rebalance -c 192.168.0.1:8091 \
--server-remove=192.168.0.2 \
--server-add=192.168.0.4 \
--server-add-username=Administrator \
--server-add-password=password
Stopping rebalance
The following example stops the current rebalancing:
couchbase-cli rebalance-stop -c 192.168.0.1:8091
Setting cluster parameters
The following example sets the username, password, port and ram quota:
couchbase-cli cluster-init -c 192.168.0.1:8091 \
--cluster-init-username=Administrator \
--cluster-init-password=password \
--cluster-init-port=8080 \
--cluster-init-ramsize=300
The following example changes the cluster username, password, port and ram quota:
couchbase-cli cluster-edit -c 192.168.0.1:8091 \
--cluster-username=Administrator \
--cluster-password=password \
--cluster-port=8080 \
--cluster-ramsize=300
Setting the data path and hostname for an unprovisioned cluster
The following example changes the data path and sets the host name for an unprovisioned cluster:
couchbse-cli node-init -c 192.168.0.1:8091 \\
--node-init-data-path=/tmp/data \\
--node-init-index-path=/tmp/index \\
--node-init-hostname=myhostname \\
-u Administrator -p password