21.1. Upgrade instructions

[Important] Important information for upgrading to BASE 3.15

This section list some important information that may or may not apply when upgrading from the previous BASE release to the current release (eg. 3.14 to 3.15). If you are upgrading from a BASE installation that is older (3.0-3.13) you should also read Appendix J, Things to consider when updating an existing BASE installation.

Consider upgrading to Java 11 (OpenJDK)

The next BASE release, BASE 3.16, will only support Java 11 or later. BASE 3.15 is the last BASE version that supports Java 8. Our recommendation is to upgrade to Java 11 as soon as possible. Note that Oracle no longer provide a free JDK or JRE. Instead, OpenJDK has to be used, which can be downloaded from https://openjdk.java.net/

If you experience any problems with BASE 3.15 and Java 8 you could try removing the listed files from the www/WEB-INF/lib directory and then restart Tomcat. The listed JAR files contains functionality that is included in core Java 8 but has been removed from Java 11.

  • java.activation-api-1.2.0.jar
  • jaxb-api-2.3.1.jar
  • jaxb-core-2.3.0.1.jar
  • jaxb-impl-2.3.1.jar

Consider upgrading to Tomcat 9 and PostgreSQL 11

We have started to test BASE with Tomcat 9 and PostgreSQL 11 and we have not found any problems so far. For new installations we recommend that Tomcat 9 and PostgreSQL 11 is used. Official support for Tomcat 8 and PostgreSQL 9 will be dropped in a future BASE version. For existing installations our recommendation is to start planning for an upgrade to Tomcat 9 and PostgreSQL 11.

Secondary storage support has been removed

The Secondary storage feature has been removed. Files that are located in the secondary storage will be marked as offline by the upgrade script. The recommendation is to replace this feature with an external files solution instead.

Spot images support has been removed

It is no longer possible to create new spot images or view existing spot images via the BASE web client. Existing source image files and zip archives with generated spot images have not been removed.

Customizations made in Tomcat's global web.xml file

In the configuration directory for Tomcat there is a web.xml file that define global options for all web applications. The settings in this file can be overridden per web application in the WEB-INF/classes/web.xml. BASE 3.15 re-defines the jsp <servlet> definition to make sure that JSP files are compiled with proper settings. Changes that have been made to the global web.xml file for the jsp <servlet> must be moved or copied to the web.xml file for the BASE web application.

As always, backup your database before attempting an upgrade. The BASE team performs extensive testing before releasing a new version of BASE but there are always a possibility for unexpected events during upgrades. In upgrades requiring a change in the underlying database there is no (supported) way to revert to a previous version of BASE using BASE tools, you need to use your backup for this use case.

The strategy here is to install the new BASE release to another directory than the one in use. This requires transfer of configuration settings to the new install but more on that below.

Shut down the Tomcat server

If the BASE application is not shut down already, it is time to do it now. Do something like sudo /etc/init.d/tomcat9.0 stop

[Tip] Notify logged in users!

If there are users logged in to your BASE server, it may be nice of you to notify them a few minutes prior to shutting down the BASE server. See Section 21.4.1, “Sending a broadcast message to logged in users”.

Rename your current server

Rename your current BASE installation mv /path/to/base /path/to/base_old.

Download and unpack BASE

There are several ways to download BASE. Please refer to section Section 3.1.1, “Download” for information on downloading BASE, and select the item matching your download option:

Pre-compiled package

If you selected to download a pre-compiled package, unpack the downloaded file with tar zxpf base-...tar.gz.

Source package

If you selected to download a source package, unpack the downloaded file with tar zxpf base-...src.tar.gz. Change to the new directory, and issue ant package.bin. This will create a binary package in the current directory. Unpack this new package (outside of the source file hierarchy).

Subversion checkout

This option is for advanced users only and is not covered here. Please refer to http://base.thep.lu.se/wiki/BuildingBase for information on this download option.

Transfer files and settings

Settings from the previous installation must be transferred to the new installation. This is most easily done by comparing the configuration files from the previous install with the new files. Do not just copy the old files to the new install since new options may have appeared.

In the main BASE configuration file, <base-dir>/www/WEB-INF/classes/base.config, fields that needs to be transferred are usually db.username, db.password, and userfiles.

Local settings in the raw data tables, <base-dir>/www/WEB-INF/classes/raw-data-types.xml, may need to be transferred. This also includes all files in the <base-dir>/www/WEB-INF/classes/raw-data-types and <base-dir>/www/WEB-INF/classes/extended-properties directories.

Updating database schema

It is recommended that you also perform an update of your database schema. Running the update scripts are not always necessary when upgrading BASE, but the running the update scripts are safe even in cases when there is no need to run them. Change directory to <base-dir>/bin/ and issue

sh ./updatedb.sh [base_root_login] base_root_password

where base_root_login is the login for the root user and base_root_password is the password. The login is optional. If not specified, root is used as the login.

Start Tomcat

Start the Tomcat server: sudo /etc/init.d/tomcat9.0 start

Done! Upgrade of BASE is finished.