Setting metadata ejection policy

Setting metadata ejection policy

Bucket ejection from memory is set with couchbase-cli tool.

Description

Bucket ejection from memory is set with couchbase-cli tool, either bucket-create or bucket-edit , and the --bucket-eviction-policy parameter.

CLI command and parameter

The following is the tool, commands, and parameter used to set the policy for how to retain metadata in memory:


couchbase-cli bucket-create --bucket-eviction-policy=[valueOnly | fullEviction] 
couchbase-cli bucket-edit   --bucket-eviction-policy=[valueOnly | fullEviction] 
 

Syntax

Basic syntax:


couchbase-cli bucket-create -c [localhost]:8091 -u [admin-name] -p [password] 
  --bucket=test_bucket
  --bucket-eviction-policy=[valueOnly | fullEviction] 

Example: Creating a new bucket

To create a new sasl bucket and set the eviction policy to valueOnly :


couchbase-cli bucket-create -c 192.168.0.1:8091 -u Administrator -p password 
  --bucket=test_bucket
  --bucket-password=password
  --bucket-ramsize=200
  --bucket-eviction-policy=valueOnly
  --enable-flush=1

Example: Modifying a bucket

To modify a dedicated port bucket and set the eviction policy to fullEviction :


couchbase-cli bucket-edit -c 192.168.0.1:8091 -u Administrator -p password 
  --bucket=test_bucket 
  --bucket-port=11222 	
  --bucket-ramsize=400 	
  --bucket-eviction-policy=fullEviction 
  --enable-flush=1