For customers who manage their own servers, there are two options for upgrading the VoltDB software for an existing database:
Using the voltadmin save and restore commands before and after shutting down and upgrading the software.
Using two (or more) XDCR clusters to upgrade the clusters one at a time without a service interruption.
The following sections describe how to update the software itself and the two options for upgrading existing installations.
Updating the VoltDB software is very simple. However, you must make sure you perform this step at the right stage in the upgrade process, as described in the following sections. The product comes as a .tar.gz file. When the time comes to upgrade the software, you unpack the tar file and move the resulting folder to replace your current installation. For example, if you have the VoltDB software installed as /var/voltdb, the software installation looks like the following, where you delete the previous version and replace it with the new one:
$ tar -zxvf vltdb-ent-x.x.x.tar.gz -C /var $ cd /var $ rm -vr voltdb $ mv voltdb-ent-x.x.x voltdb
Remember, when upgrading an existing installation with a running database, you need to upgrade both the software and the database itself. Which means you must make sure you perform the update steps in the correct order. The following sections explain the different options for updating existing installations, including at what stage in the process you should replace the software.
Upgrading the VoltDB software on a single database cluster is easy. All you need to do is perform an orderly shutdown saving a final snapshot, upgrade the VoltDB software on all servers in the cluster, then restart the database. The steps to perform this procedure are:
Shutdown the database and save a final snapshot (voltadmin shutdown --save).
Upgrade the VoltDB software on all cluster nodes (instructions).
Restart the database (voltdb start).
This process works for any recent (V6.8 or later) release of VoltDB.
It is also possible to upgrade the VoltDB software using cross data center replication (XDCR), by simply shutting down, upgrading, and then re-initalizing each cluster, one at a time. This process requires no downtime, assuming your client applications are already designed to switch between the active clusters.
Use of XDCR for upgrading the VoltDB software is easiest if you are already using XDCR because it does not require any additional hardware or reconfiguration. The following instructions assume that is the case. Of course, you could also create a new cluster and establish XDCR replication between the old and new clusters just for the purpose of upgrading VoltDB. The steps for the upgrade outlined in the following sections are the same. But first you must establish the cross data center replication between the two (or more) clusters. See the chapter on Database Replication in the Using VoltDB manual for instructions on completing this initial step.
Pause and shutdown cluster A (voltadmin pause --wait and shutdown).
Clear the DR state on cluster B (voltadmin dr reset).
Update the VoltDB software on cluster A.
Start a new database instance on A, making sure to use the old deployment file so the XDCR connections are configured properly (voltdb init --force and voltdb start).
Load the schema on Cluster A so replication starts.
Once the two clusters are synchronized, repeat steps 1 through 4 for cluster B.
Note that since you are upgrading the software, you must create a new instance after the upgrade (step #3). When upgrading the software, you cannot recover the database using just the voltdb start command; you must use voltdb init --force first to create a new instance and then reload the existing data from the running cluster B.
Also, be sure all data has been copied to the upgraded cluster A after step #4 and before
proceeding to upgrade the second cluster. You can do this by checking the @Statistics system procedure selector DRCONSUMER
on cluster A. Once the DRCONSUMER statistics
State column changes to "RECEIVE", you know the two
clusters are properly synchronized and you can proceed to step #5.