The following are officially supported upgrade paths for Couchbase Server for both online upgrades or offline upgrades:
Couchbase 1.8.1 to Couchbase 2.0.x and above
Couchbase 2.0 to Couchbase 2.0.x and above
If you want to upgrade from 1.8.0 to 2.0.x, you must have enough disk space available for both your original Couchbase Server 1.8 data files and the new format for Couchbase Server 2.0 files. You will also need additional disk space for new functions such as indexing and compaction. You will need approximately three times the disk space.
Direct upgrades from Couchbase Server 1.8.0 to 2.0 or earlier releases are not supported. You must first upgrade to Couchbase Server 1.8.1 to provide data compatibility with Couchbase Server 2.0 +.
You can perform a cluster upgrade in two ways:
You can upgrade your cluster without taking your cluster down and so your application keeps running during the upgrade process. There are two ways you can perform this process: as a standard, rolling online upgrade, or as a swap rebalance. Using the standard, rolling upgrade, you take down one or two nodes from a cluster, and rebalance so that remaining nodes handle incoming requests. This is an approach you use if you have enough remaining cluster capacity to handle the nodes you remove and upgrade. You will need to perform rebalance twice for every node you upgrade: the first time to move data onto remaining nodes, and a second time to move data onto the new nodes. For more information about a standard, rolling upgrade, see
Standard online upgrades may 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. However since you can upgrade the cluster without taking it cluster down, you may prefer this upgrade method. For instructions on online upgrades, see Section 2.5.1, “Online Upgrades” .
For swap rebalance, you add a note to the cluster then perform a swap rebalance to shift data from an old node to a new node. You might prefer this approach if you do not have enough cluster capacity to handle data when you remove an old node. This upgrade process is also much quicker than performing a standard online upgrade because you only need to rebalance each upgraded node once. For more information on swap rebalance, see Section 5.7.3, “Swap Rebalance”.
This type of upgrade must be well-planned and scheduled. For offline upgrades, you shut down your application first so that no more incoming data arrives. Then you shut down each Couchbase Server node and verify the disk write queue is 0. This way you know that Couchbase Server has stored all items onto disk from during shutdown. You then perform an install of the latest version of Couchbase onto the machine. The installer will automatically detect the files from the older install and convert them to the correct format, if needed.
Offline upgrades can take less time than online upgrades because you can upgrade every node in the cluster at once. The cluster must be shut down for the upgrade to take place. Both the cluster and all the applications built on it will not be available during this time. For full instructions on performing an offline upgrade, see Section 2.5.3, “Offline Upgrade Process” .
|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|
Before you perform an upgrade, whether it is online or offline, you should backup your data, see Section 5.6, “Backup and Restore”.