Search:

Search all manuals
Search this manual
Manual
Couchbase Server Manual 1.8
Additional Resources
Community Wiki
Community Forums
Couchbase SDKs
Parent Section
2.3 Upgrading to Couchbase Server 1.8
Chapter Sections
Chapters

2.3.3. Node Upgrade Process

2.3.3.1. Upgrading from Membase Server 1.7.2 and Couchbase Server 1.8.0 to Couchbase Server 1.8.1 (Windows only)
2.3.3.2. Upgrading from Membase Server 1.7
2.3.3.3. Manually Controlled Upgrade Options

Whether you are performing an online or offline upgrade, the steps for upgrading an individual node, including the shutdown, installation, and startup process remains the same.

  1. Download couchbase-server-edition_and_arch_version .

  2. Backup the node data. To backup an existing Couchbase Server installation, use cbbackup . See Section 5.2.1, “Backing Up” .

  3. Backup the node specific configuration files. While the upgrade script will perform a backup of the configuration and data files, it is our recommended best practice to take your own backup of the files located at:

    PlatformLocation
    Linux/opt/couchbase/var/lib/couchbase/config/config.dat
    WindowsC:\Program Files\Couchbase\Server\Config\var\lib\couchbase\config\config.dat
  4. Linux Upgrade Process from Couchbase Server 1.8.x

    Red Hat/CentOS Linux

    You can perform an upgrade install using the RPM package — this will keep the data and existing configuration.

    root-shell> rpm -U couchbase-server-architecture___meta_current_version__.rpm

    Ubuntu/Debian Linux

    You can perform a package upgrade by installing the updated .pkg package:

    shell> sudo dpkg -i couchbase-server-architecture___meta_current_release.deb

    Windows Upgrade Process

    Warning

    If you are upgrading from Membase Server 1.7.2 or Couchbase Server 1.8.0 to Couchbase Server 1.8.1 you must perform additional steps. See Section 2.3.3.1, “Upgrading from Membase Server 1.7.2 and Couchbase Server 1.8.0 to Couchbase Server 1.8.1 (Windows only)”.

    The Couchbase Server Windows installer will upgrade your server installation using the same installation location. For example, if you have installed Couchbase Server in the default location, C:\Program Files\Couchbase\Server , the Couchbase Server installer will copy new 1.8.1 files to the same location.

Warning

The TCP/IP port allocation on Windows by default includes a restricted number of ports available for client communication. For more information on this issue, including information on how to adjust the configuration and increase the available ports, see MSDN: Avoiding TCP/IP Port Exhaustion.

2.3.3.1. Upgrading from Membase Server 1.7.2 and Couchbase Server 1.8.0 to Couchbase Server 1.8.1 (Windows only)

Due to a change in the packaging for Couchbase Server 1.8.1 on Windows you need to run the package installation twice in order to register the package and upgrade correctly. The correct steps are:

  1. Download Windows installed package for Couchbase Server 1.8.1.

  2. Backup the node before running the upgrade process. If you are backing up an existing Membase Server 1.7.x installation, see Membase Server 1.7 Backup. For Couchbase Server 1.8.0, see Section 5.2.1, “Backing Up”.

  3. If you are upgradeding from Membase Server 1.7.2, stop Membase Server. For Couchbase Server 1.8.0, stop Couchbase Server. For more information, see Section 3.2.2, “Startup and Shutdown on Windows”. Wait until the server process has stopped completely before continuing.

  4. Double-click on the downloaded package installer for Couchbase Server 1.8.1. The initial execution will update the registry information in preparation for the full upgrade.

  5. Double-click on the downloaded package installer for Couchbase Server 1.8.1. This second installation will take you through the full installation process, upgrading your existing installation for the new version. Follow the on-screen instructions to perform the upgrade.

Once the process has completed, you can start Couchbase Server 1.8.1 and re-add and rebalance your node into your cluster.

2.3.3.2. Upgrading from Membase Server 1.7

If you are upgrading from Membase Server 1.7 you should take a backup and copy your configuration files, before uninstalling the existing Membase Server product. This will keep the data files in place where they will be upgraded during the installation and startup of Couchbase Server 1.8.

Step-by-step instructions are probided below:

  1. Download couchbase-server-edition_and_arch_version .

  2. Backup the node data. Use mbbackup if you are upgrading from Membase Server 1.7.x (see Backup and Restore in Membase Server 1.7.x ). If you are upgrading Couchbase Server, use cbbackup . See Section 5.2.1, “Backing Up” .

  3. Backup the node specific configuration files. While the upgrade script will perform a backup of the configuration and data files, it is our recommended best practice to take your own backup of the files located at:

    VersionPlatformLocation
    Membase Server 1.7.xLinux/opt/membase/var/lib/membase/config/config.dat
    Membase Server 1.7.xWindowsC:\Program Files\Membase\Server\Config\var\lib\membase\config.dat

    Important

    If you have multiple version subdirectories in your /etc/opt/membase directory, you must first cleanup the directory so only the last, most recent version remains.

  4. Linux Upgrade Process from Membase Server 1.7.x

    Linux package managers will prevent the couchbase-server package from being installed when there's already a membase-server package installed.

    Red Hat/CentOS Linux

    1. Uninstall the existing membase-server package — this will keep the user's db data and copies of their configuration.

      root-shell> rpm -e membase-server
    2. Install Couchbase Server 1.8 with special environment variable flags, which force an upgrade. The special env var is INSTALL_UPGRADE_CONFIG_DIR .

      root-shell> INSTALL_UPGRADE_CONFIG_DIR=/opt/membase/var/lib/membase/config \
          rpm -i \
          couchbase-server-architecture_1.8.1.rpm

    Ubuntu/Debian Linux

    1. Uninstall the existing membase-server package — this will keep the user's db data and copies of their configuration.

      shell> sudo dpkg -r membase-server
    2. Install Couchbase Server 1.8 with special environment variable flags, which forces an upgrade. The special env var is INSTALL_UPGRADE_CONFIG_DIR

      shell> sudo INSTALL_UPGRADE_CONFIG_DIR=/opt/membase/var/lib/membase/config \
          dpkg -i \
          couchbase-server-architecture_1.8.1.deb
  5. Windows Upgrade Process

    The Couchbase Server Windows installer will upgrade your current Membase Server installation to Couchbase Server, using the same installation location. If you have installed Membase Server in the default location, C:\Program Files\Membase\Server , the Couchbase Server installer will copy the new files to the same location. Once the upgrade process is completed you will see the Couchbase Server icon on the Desktop and under Start->Programs replacing Membase Server.

After every node has been upgraded and restarted, and you can monitor its progress of "warming up". For more details, see Section 11.2, “Monitoring startup (warmup)” . Turn your application back on.

2.3.3.3. Manually Controlled Upgrade Options

Note

This section is not applicable to Windows.

By using environment variable flags during installation you may optionally take more control of the upgrade process and results. The available environment variables are:

  • INSTALL_UPGRADE_CONFIG_DIR

    This variable sets the value of the directory of the previous versions config directory. When this environment variable is defined, the rpm/dpkg scripts will upgrade configuration files and data records from Membase Server 1.7 to Couchbase Server 1.8.

    The data directory defined and used by your Membase Server 1.7 installation will continue to be used by your upgraded Couchbase Server 1.8.1 instance. For example, if you had mounted/mapped special filesystems for use while running Membase Server 1.7, those paths will continue to be used after upgrading to Couchbase Server 1.8.1.

  • INSTALL_DONT_START_SERVER

    When set to '1', the rpm / dpkg scripts will not automatically start the Couchbase Server as its last step.

  • INSTALL_DONT_AUTO_UPGRADE

    When set to '1', the rpm / dpkg scripts will not automatically invoke the cbupgrade script that's included in Couchbase Server 1.8.1, allowing you to manually invoke cbupgrade later. This may be useful in case you need to perform more debugging. This should be used with the INSTALL_DONT_START_SERVER=1 and INSTALL_UPGRADE_CONFIG_DIR= PATH environment variables.

Example flag usage for RedHat / CentOS:

INSTALL_DONT_START_SERVER=1 INSTALL_DONT_AUTO_UPGRADE=1 \
    INSTALL_UPGRADE_CONFIG_DIR=/opt/membase/var/lib/membase/config \
    rpm -i couchbase-server-community_x86_64_1.8.1.rpm

For Ubuntu

INSTALL_DONT_START_SERVER=1 INSTALL_DONT_AUTO_UPGRADE=1 \
    INSTALL_UPGRADE_CONFIG_DIR=/opt/membase/var/lib/membase/config \
    dpkg -i couchbase-server-community_x86_64_1.8.1.deb

Example output when using flags, first uninstalling the existing Membase Server 1.7.x:

[root@localhost ~]# rpm -e membase-server
Stopping membase-server[ OK ]
warning: /opt/membase/var/lib/membase/config/config.dat saved as /opt/membase/var
/lib/membase/config/config.dat.rpmsave
[root@localhost ~]# INSTALL_DONT_START_SERVER=1 INSTALL_DONT_AUTO_UPGRADE=1
INSTALL_UPGRADE_CONFIG_DIR=/opt/membase/var/lib/membase/config rpm -i
couchbase-server-community_x86_64_1.8.1r-55-g80f24f2.rpm
Upgrading couchbase-server ...
/opt/couchbase/bin/cbupgrade -c /opt/membase/var/lib/membase/config -a yes
Skipping cbupgrade due to INSTALL_DONT_AUTO_UPGRADE ...
Skipping server start due to INSTALL_DONT_START_SERVER ...
You have successfully installed Couchbase Server.
Please browse to http://localhost.localdomain:8091/ to configure your server.
Please refer to http://couchbase.com for additional resources.
Please note that you have to update your firewall configuration to
allow connections to the following ports: 11211, 11210, 4369, 8091
and from 21100 to 21299.
By using this software you agree to the End User License Agreement.
See /opt/couchbase/LICENSE.txt.
[root@localhost ~]#

After using the INSTALL_DONT_AUTO_UPGRADE option, you can use the /opt/couchbase/bin/cbupgrade program later to fully control the upgrade steps. It's command-line options include:

[root@localhost ~]# /opt/couchbase/bin/cbupgrade -h
Usage: cbupgrade [-c path/to/previous/config/dir] [-a AUTO] [-d FILENAME] [-n] [-s FACTOR]
-c <path/to/previous/config/dir>
-- example: -c /etc/opt/membase/1.6.5.3.1
-a <yes|no>
-- automatic or non-interactive mode; default is 'no';
'yes' to force automatic 'yes' answers to all questions
-d <dbdir_output_file>
-- retrieve db directory from config file and exit
-n -- dry-run; don't actually change anything
-s <free_disk_space_needed_factor>
-- free disk space needed, as a factor of current bucket usage
-- default value is 2.0
-- example: -s 1.0

The cbupgrade program can be run using the -n flag, which tells cbupgrade to not modify any files, but just describe the changes it would make. For example:

[root@localhost ~]# /opt/couchbase/bin/cbupgrade -c /opt/membase/var/lib/membase/config -nDry-run
mode: no actual upgrade changes will be made.
Upgrading your Couchbase Server to 1.8.1r-55-g80f24f2.
The upgrade process might take awhile.
Analysing...
Previous config.dat file is /opt/membase/var/lib/membase/config/config.dat.rpmsave
Target node: ns_1@127.0.0.1
Membase/Couchbase should not be running.
Please use: /etc/init.d/couchbase-server stop
or: /etc/init.d/membase-server stop
Is the Membase/Couchbase server already stopped? [yes|no]
yes
Database dir: /opt/membase/var/lib/membase/data
Is that the expected database directory to upgrade? [yes|no]
yes
Buckets to upgrade: default
Are those the expected buckets to upgrade? [yes|no]
yes
Checking disk space available for buckets in directory:
/opt/membase/var/lib/membase/data
Free disk bucket space wanted: 0.0
Free disk bucket space available: 177790963712
Free disk space factor: 2.0
Ok.
Analysis complete.
Proceed with config & data upgrade steps? [yes|no]
yes
SKIPPED (dry-run): Copying /opt/membase/var/lib/membase/config/config.dat.rpmsave
SKIPPED (dry-run): cp /opt/membase/var/lib/membase/config/config.dat.rpmsave /opt/couchbase/var
/lib/couchbase/config/config.dat
Ensuring bucket data directories.
SKIPPED (dry-run): Ensuring bucket data directory: /opt/membase/var/lib/membase/data/default-data
SKIPPED (dry-run): mkdir -p /opt/membase/var/lib/membase/data/default-data
SKIPPED (dry-run): Ensuring dbdir owner/group: /opt/membase/var/lib/membase/data
SKIPPED (dry-run): chown -R couchbase:couchbase /opt/membase/var/lib/membase/data
SKIPPED (dry-run): Ensuring dbdir owner/group: /opt/membase/var/lib/membase/data
SKIPPED (dry-run): chown -R couchbase:couchbase /opt/membase/var/lib/membase/data
Upgrading buckets.
Skipping already converted bucket: /opt/membase/var/lib/membase/data/default-data
Skipping already converted bucket: /opt/membase/var/lib/membase/data/test0-data
Done.