21.1. Upgrade instructions

[Important] Important information for upgrading to BASE 3.14

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.13 to 3.14). If you are upgrading from a BASE installation that is older (3.0-3.12) you should also read Appendix J, Things to consider when updating an existing BASE installation.

The db.driver setting is no longer used

The JDBC driver to use is now found automatically based on the db.url setting in the base.config file. The db.driver setting can be removed.

The (very) old Authenticator API has been removed

The net.sf.basedb.core.authentication.Authenticator interface and other related code that was deprecated in BASE 3.3 has been removed. Systems that still use old authentication code need to replace this with a newer version before updating.

Changes to the authentication system

The authentication system has been updated to make it easier to install more than one external authentication manager. The changes are backwards compatible and existing authentication managers should still work as before as long as they are the only ones installed. However, the existing authentication managers will probably not work well if more than one is installed since they lack some features that are neccessary in order to cooperate with other managers. Before installing more than one authentication manager it is recommended that they are updated to newer versions.

Newer authentication managers typically no longer provide support for password authentication. If the intention is that some users still should be able to login with username+password, it is recommended that the Password login form is enabled. Go to AdministratePlug-ins & extensionsOverview and locate the Login form customization extension point to find it.

Java 11

Java 8 is still the only officially supported version, but our intention is to switch to Java 11 (or later) some time in the near future (2019). We have made some initial tests with Java 11 and believe that BASE should work. However, it requires an extra installation step:

Copy the JAR-files located in <base-dir>/misc/java11/ to the <base-dir>/www/WEB-INF/lib/ directory. If you are running a BASE server today it might be a good idea to be prepared by setting up a test environment that is running a clone of the main server under Java 11.

Secondary storage

The Secondary storage feature has been deprecated and will be removed in a future release. The recommendation is to replace this feature with an external files solution instead.

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/tomcat8.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/tomcat8.0 start

Done! Upgrade of BASE is finished.