| Linux | /opt/couchbase/bin/couchbase-cli |
| Windows | C:\Program
Files\Couchbase\Server\bin\cli\couchbase-cli.exe |
| Mac OS X | /Applications/Couchbase\
Server.app/Contents/Resources/couchbase-core/bin/couchbase-cli |
This tool provides access to various management operations for Couchbase Server clusters, nodes and buckets. The basic usage format is:
couchbase-cli COMMAND CLUSTER [OPTIONS]Where:
COMMAND is a command from
Table 7.2, “Administration — couchbase Tool Commands”
CLUSTER is a cluster specification. You can
use either:
--cluster=HOST[:PORT]Or the shortened form:
-c HOST[:PORT]
OPTIONS is zero or more options.
Table 7.2. Administration — couchbase Tool Commands
| Command | Description |
|---|---|
server-list | List all servers in a cluster |
server-info | Show details on one server |
server-add | Add one or more servers to the cluster |
server-readd | Re-add a server that was failed over to the cluster |
rebalance | Start a cluster rebalancing |
rebalance-stop | Stop current cluster rebalancing |
rebalance-status | Show status of current cluster rebalancing |
failover | Failover one or more servers |
cluster-init | Set the username, password and port of the cluster |
node-init | Set node specific parameters |
bucket-list | List all buckets in a cluster |
bucket-create | Add a new bucket to the cluster |
bucket-edit | Modify an existing bucket |
bucket-delete | Delete an existing bucket |
bucket-flush | Flush a given bucket |
help | Show longer usage/help and examples |
Table 7.3. Administration — Standard couchbase Tool Options
| Option | Command | Description |
|---|---|---|
--user=USERNAME,-u USERNAME | Administrator username for accessing the cluster | |
--password=PASSWORD,-p PASSWORD | Administrator password for accessing the cluster | |
--output=KIND,-o KIND | Output kind, either json for JSON format, or
standard for the native format for the
command. | |
--debug,-d | Output debug information. | |
--server-add=HOST[:PORT] | server-add,server-readd,
rebalance | Server to be added |
--server-add-username=USERNAME | server-add,server-readd,
rebalance | Admin username for the server to be added |
--server-add-password=PASSWORD | server-add,server-readd,
rebalance | Admin password for the server to be added |
--server-remove=HOST[:PORT] | rebalance | The server to be removed |
--server-failover=HOST[:PORT] | failover | Server to failover |
--cluster-init-username=USER | cluster-init | New admin username |
--cluster-init-password=PASSWORD | cluster-init | New admin password |
--cluster-init-port=PORT | cluster-init | New cluster port |
--cluster-init-ramsize=300 | cluster-init | New RAM quota |
--bucket=BUCKETNAME | bucket* | Bucket to act on |
--bucket-type=TYPE | bucket* | Memcached or Couchbase |
--bucket-port=PORT | bucket* | Supports ASCII protocol and is auth-less |
--bucket-password=PASSWORD | bucket* | Standard port, exclusive with bucket-port |
--bucket-ramsize=RAMSIZEMB | bucket* | RAM quota in MB |
--bucket-replica=COUNT | bucket* | Replication count |