Search:

Search all manuals
Search this manual
Manual
Couchbase Server Manual 2.0
Community Wiki and Resources
Download Couchbase Server 2.0
Couchbase Developer Guide 2.0
Client Libraries
Couchbase Server Forum
Additional Resources
Community Wiki
Community Forums
Couchbase SDKs
Parent Section
7 Command-line Interface for Administration
Chapter Sections
Chapters

7.4. couchbase-cli Tool

7.4.1. Flushing Buckets with couchbase-cli
7.4.2. Other couchbase-cli Usage

You can find this tool in the following locations, depending upon your platform. This tool can perform operations on an entire cluster, on a bucket shared across an entire cluster, or on a single node in a cluster. For instance, if you use this tool to create a data bucket, it will create a bucket that all nodes in the cluster have access to.

Linux/opt/couchbase/bin/couchbase-cli
WindowsC:\Program Files\Couchbase\Server\bin\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 [BUCKET_NAME] CLUSTER [OPTIONS]

Where:

Table 7.3. Administration — couchbase Tool Commands

CommandDescription
server-listList all servers in a cluster
server-infoShow details on one server
server-addAdd one or more servers to the cluster
server-readdRe-add a server that was failed over to the cluster
rebalanceStart a cluster rebalancing
rebalance-stopStop current cluster rebalancing
rebalance-statusShow status of current cluster rebalancing
failoverFailover one or more servers
cluster-initSet the username, password and port of the cluster
node-initSet node specific parameters
bucket-listList all buckets in a cluster
bucket-createAdd a new bucket to the cluster
bucket-editModify an existing bucket
bucket-deleteDelete an existing bucket
bucket-flushFlush a given bucket
helpShow longer usage/help and examples

Administration — couchbase Tool commands:

Table 7.4. Administration — Standard couchbase Tool Options

OptionCommandDescription
--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, rebalanceServer to be added
--server-add-username=USERNAMEserver-add,server-readd, rebalanceAdmin username for the server to be added
--server-add-password=PASSWORDserver-add,server-readd, rebalanceAdmin password for the server to be added
--server-remove=HOST[:PORT]rebalanceThe server to be removed
--server-failover=HOST[:PORT]failoverServer to failover
--cluster-init-username=USERcluster-initNew admin username
--cluster-init-password=PASSWORDcluster-initNew admin password
--cluster-init-port=PORTcluster-initNew cluster port
--cluster-init-ramsize=300cluster-initNew RAM quota
--bucket=BUCKETNAMEbucket*Bucket to act on
--bucket-type=TYPEbucket*Memcached or Couchbase
--bucket-port=PORTbucket*Supports ASCII protocol and is auth-less
--bucket-password=PASSWORDbucket*Standard port, exclusive with bucket-port
--bucket-ramsize=RAMSIZEMBbucket*RAM quota in MB
--bucket-replica=COUNTbucket*Replication count

You can also perform many of these same settings using the REST-API, see Chapter 8, Using the REST API.