Upgrading

Couchbase Server can be upgraded online (using swap rebalance or the standard online upgrade), offline, or using XDCR.

Remember: Before performing an upgrade, whether it is online or offline, back up your data.

Install the latest version of Couchbase Server. The installer will automatically detect the files from the earlier installation and convert them to the correct format, if needed.

Feature Online Upgrades Offline Upgrades
Applications Remain Available Yes No
Cluster Stays in Operation Yes No
Cluster must be Shutdown No Yes
Time Required Requires Rebalance, Upgrade, Rebalance per Node All nodes in Cluster Upgraded at Once

Online upgrades

When you perform an online upgrade, there is no need to take the cluster down and application keeps running during the upgrade process.

You can upgrade the Couchbase Server using a standard online upgrade, or an online upgrade with swap rebalance.
Note: Swap rebalance is recommended because it always maintains cluster capacity. Use the standard online upgrade only if upgrade with swap rebalance is not possible.
Online upgrade with swap rebalance
For swap rebalance, first add a node to the cluster and then perform a swap rebalance to shift data from an old node to the new one. This is a preferred upgrade method when there is not enough cluster capacity to handle data when an old node is removed. It is also much faster from the standard online upgrade because you only need to rebalance each upgraded node once.

To perform an online upgrade with swap rebalance, see Online upgrade with swap rebalance.

Standard online upgrade
For standard online upgrade, take down one or two nodes from a cluster and rebalance so that remaining nodes handle incoming requests. You can use this upgrade option only if you have enough remaining cluster capacity to handle the nodes you remove and upgrade. You need to perform rebalance twice for every node you upgrade: first to move data to remaining nodes, and then to move data to the new nodes.

Standard online upgrades can take a while because each node must be taken out of the cluster, upgraded to a current version, brought back into the cluster, and then rebalanced.

Offline upgrades

Offline upgrades can take less time than online upgrades because all nodes in the cluster can be upgraded at once.

An offline upgrade must be well-planned and scheduled. First, shut down your application so that no more incoming data arrives. Second, verify that the disk write queue is 0 and then shut down each node. This way you know that Couchbase Server has stored all items onto disk during shutdown. After shutting down applications and nodes, perform the upgrade on each machine and then bring the cluster and applications back again.

To perform an offline upgrade, see Offline upgrade process.

Upgrading with XDCR

This upgrade has to be taken cautiously and only in specific situations. Be sure that you are familiar with all requirements before deciding to use this process.