bucket-edit

bucket-edit

Edit a bucket

SYNTAX

couchbase-cli bucket-edit [--cluster <url>] [--username <user>]
          [--password <password>] [--bucket <name>] [--bucket-ramsize <size>]
          [--bucket-replica <num>] [--bucket-priority <priority>]
          [--bucket-eviction-policy <policy>] [--enable-flush <num>]

DESCRIPTION

Modifies the settings of the bucket specified. Note that some settings can be applied immediately, while other settings either require a rebalance, or require the bucket to be restarted; resulting in potential application downtime.

OPTIONS

-c
--cluster

Specfies 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 permision 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 permision 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.

--bucket <name>

The name of the bucket to edit.

--bucket-ramsize <size>

The amount of memory to allocate to the cache for this bucket, in Megabytes. The memory quota of this bucket must fit into the overall cluster memory quota. The minimum cache size is 100MB.

--bucket-replica <num>

The number of servers to which data is replicated. Replicas provide protection against data loss by keeping copies of a bucket’s data on multipleservers. By default, the number of replicas is one, even if there is only a single server in the cluster. The minimum number of replicas is zero, and the maximum three. This option is valid for Couchbase and Ephemeral buckets only.

--bucket-port <num>

Sets the port on which the bucket listens. This parameter is deprecated, and therefore not recommended for use.

--bucket-priority <priority>

Specifies the priority of this bucket’s background tasks. This option is valid for Couchbase and Ephemeral buckets only. For Couchbase buckets, background task-types include disk I/O, DCP stream-processing, and item-paging. For Ephemeral buckets, background task-types are the same as for Couchbase buckets, with the exception of disk I/O, which does not apply to Ephemeral buckets. The value of this option may be "high" or "low". The default is "low". Specifying "high" may result in faster processing; but only when more than one bucket is defined for the cluster, and when different priority settings have been established among the buckets. When Couchbase and Ephemeral buckets have different priority settings, this affects the prioritization only of task-types other than disk I/O.

--bucket-eviction-policy <policy>

The memory-cache eviction policy for this bucket. This option is valid for Couchbase and Ephemeral buckets only.

Couchbase buckets support either "valueOnly" or "fullEviction". Specifying
the "valueOnly" policy means that each key stored in this bucket must be
kept in memory. This is the default policy: using this policy improves
performance of key-value operations, but limits the maximum size of the
bucket. Specifying the "fullEviction" policy means that performance is
impacted for key-value operations, but the maximum size of the bucket is
unbounded.
Ephemeral buckets support either "noEviction" or "nruEviction". Specifying
"noEviction" means that the bucket will not evict items from the cache if
the cache is full: this type of eviction policy should be used for in-memory
database use-cases. Specifying "nruEviction" means that items not recently
used will be evicted from memory, when all memory in the bucket is used:
this type of eviction policy should be used for caching use-cases.
--enable-flush <num>

Specifies whether or not the flush operation is allowed for this bucket. To enable flushing, set this option to "1". To disable flushing, set this option to "0". By default, flushing is disabled.

--enable-index-replica <num>

Enables view index replication for the current bucket. This option is valid for Couchbase buckets only. To enable, set the value of this option to "1". To disable, set the value of this option to "0". By default, view index replication is disabled. There may be at most one replica view index.

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 change the memory quota of the travel-data bucket, run the following command:

$ couchbase-cli bucket-edit -c 192.168.1.5:8091 --username Administrator \
 --password password --bucket travel-data --bucket-ramsize 1024

To change the number of replicas for the travel-data bucket to "2", run the following command. (Note that this requires a subsequent rebalance, by means of couchbase-cli-rebalance1 , to ensure that the replicas are created.)

$ couchbase-cli bucket-edit -c 192.168.1.5:8091 --username Administrator \
 --password password --bucket travel-data --bucket-ramsize 1024 \
 --bucket-replicas 2

ENVIRONMENT AND CONFIGURATION VARIABLES

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.

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.