Offline upgrade

Offline upgrade

During an offline upgrade, the cluster must be shut down and all applications built on it will not be available during that time.

Note: If you are upgrading from Couchbase Server 1.8 to Couchbase Server 2.0 or later, there are more steps for the upgrade because you must first upgrade to Couchbase 1.8.1 for data compatibility.
Tip: Check that the disk write queue is completely drained to make sure that all data has been persisted to disk and will be available after the upgrade. It is recommended that you turn off your application and allow the queue to drain before upgrading. Back up all data before upgrading.

To perform an offline upgrade:

  1. Under Settings > Auto-Failover , disable auto-failover for all nodes in the cluster. If you leave this option enabled, the first node that you shut down will be auto-failed over.
  2. Shut down your application so that no more requests are forwarded to Couchbase Cluster.

    You can monitor the activity of your cluster by using the Couchbase Web Console. The cluster needs to finish writing all information to disk. This will make sure that when you restart your cluster, all of your data can be brought back into the caching layer from disk. You can do this by monitoring the Disk Write Queue for every bucket in your cluster. When the queue reaches zero, no more data remains to be written to disk.

  3. Open the Couchbase Web Console at a node in your cluster.
  4. Click Data Buckets | your_bucket . In the Summary section, check that Disk write queue reads 0. If you have more than one data bucket in your cluster, repeat this step to verify that each bucket has a disk write queue of 0.
  5. Create a backup of your cluster data using cbbackup .
  6. Shut down Couchbase Server on each machine in your cluster.
  7. After you shut down the nodes, perform a standard node upgrade to the new version of Couchbase Server as explained in Upgrading one node .

    Couchbase Server starts automatically on each node after you perform the node upgrade.

  8. As the cluster warms up, you can monitor the status of the warmup process to determine when you can switch on your application.

After the cluster finishes warmup, you can restart your application on the upgraded cluster.

Offline upgrade to Enterprise Edition

Shut down the entire cluster and uninstall Couchbase Server Community Edition from each machine. Then install Couchbase Server Enterprise Edition on these machines. The data files will be retained, and the cluster can be restarted.