Fails over one node.
The basic syntax is:
couchbase-cli failover -c [host]:8091 -u [admin] -p [password] [options]
Nodes are failed over with one of the following methods:
Graceful failover (the default) safely fails over nodes from clusters by allowing all in-flight operations to complete before implementing the failover operation.
Graceful failover is the default behavior for the
Hard failover immediately fails over nodes from clusters and is typically used when the node is in a bad state. Auto-failover is a hard failover.
Failing over more than a single node using the
The following are the command options:
The server which will be failed over.
Fail over a node from the cluster right away.
The following examples show the failover, re-add, recovery and rebalance sequence operations. Nodes in a cluster are gracefully failed over, a node is re-added to a cluster, a delta recovery is implemented for the node, and rebalance is performed on the cluster:
couchbase-cli failover -c 192.168.0.1:8091 -u Administrator -p password \ --server-failover=192.168.0.2
couchbase-cli server-readd -c 192.168.0.1:8091 -u Administrator -p password \ --server-add=192.168.0.2
couchbase-cli recovery -c 192.168.0.1:8091 -u Administrator -p password \ --server-recovery=192.168.0.2 --recovery-type=delta
couchbase-cli rebalance -c 192.168.0.1:8091 -u Administrator -p password \
The following example shows a node failing over immediately: a hard failover is implemented rather than a graceful failover.
couchbase-cli failover -c 192.168.0.1:8091 -u Administrator -p password \ --server-failover=192.168.0.2 --force