Recovering nodes
To re-add a server node to a cluster, use the couchbase-cli tool and the recovery command with the --recovery-type parameter.
Recovery options are either delta or full.
Option | Description |
---|---|
--server-recovery=HOST[:PORT] | Server to recover |
--recovery-type=TYPE[delta|full] | Type of recovery to be performed for the node |
Syntax
couchbase-cli failover
--cluster=HOST:PORT
--server-recovery=HOST:PORT
--recovery-type=[delta|full]
--user=ADMIN
--password=PASSWORD
Setting recovery type
To set incremental node recovery type for a server:
couchbase-cli recovery -c 192.168.0.1:8091 \\
--server-recovery=192.168.0.2 \\
--recovery-type=delta \\
-u Administrator -p password
Setting failover, readd, recovery, and rebalance operations
The following example shows a failover, readd, recovery and rebalance sequence operations, where as, a node in a cluster is gracefully failed over, the node is re-added to the 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 \\
--server-failover=192.168.0.2 \\
-u Administrator -p password
couchbase-cli server-readd -c 192.168.0.1:8091 \\
--server-add=192.168.0.2 \\
-u Administrator -p password
couchbase-cli recovery -c 192.168.0.1:8091 \\
--server-recovery=192.168.0.2 \\
--recovery-type=delta \\
-u Administrator -p password
couchbase-cli rebalance -c 192.168.0.1:8091 \\
-u Administrator -p password