How to Upgrade XNAT

To current users, there are several update methodologies you can pursue. These are for normal upgrades of XNAT (i.e. from 1.4 to 1.4.1 to 1.4.2 etc). Upgrading major versions (1.3 to 1.4) will require some specialized behaviour.

Download the full release, and set it up in tandem to your old version, but re-use your prior database. This is particularly helpful if you haven't made any modifications to your projects directory or your modifications to it are limited, but you want to preserve your database (i.e. you've added lots of things you don't want to re-add). This will not work in major upgrades (i.e. 1.3 to 1.4).

When you cannot use one of the above methods, you can upgrade your existing installation (and database). This is often how we maintain our internal installations (including production ones).

New Release/ New Database

Download the full release, and set it up in tandem to your old version. Follow the steps in the installation guide to complete the installation. If you've made modifications to your projects directory, perform the following steps after Step 5 in the installation guide.

Copy your old xnat/projects directory into the new release (xnat/projects).

Run the update.sh command (with the same deploy=true option if used on the setup).

update.sh

Run bin/generate-create-sql.sh from the xnat directory

bin/generate-create-sql.sh

New Release/ Old Database

Download the full release, and set it up in tandem to your old version, but re-use your prior database. This is particularly helpful if you haven't made any modifications to your projects directory or your modifications to it are limited, but you want to preserve your database (i.e. you've added lots of things you don't want to re-add). This will not work in major upgrades (i.e. 1.3 to 1.4).

Run the following steps,

Backup your database (using pgdump)

Download the new copy of XNAT into a different location from your previous one.

Copy your build.properties file from the previous version (xnat/build.properties) to the new release (xnat/build.properties).

Another option here: Use pgdump to duplicate your database, and upgrade using that copied database. This will allow you to leave your old site up and running, until you are comfortable that your upgrade was successful. To do this, you should modify the database connection parameters in the build.properties after you copy it to the new installation.

Old Release/ Old Database

When you cannot use one of the above methods, you can upgrade your existing installation (and database). This is often how we maintain our internal installations (including production ones). Follow the ‘Release Upgrade Instructions’ listed below.

Release Upgrade Instructions

These instructions are to be used when using the upgrade package available from the download section of the website. The upgrade package includes modified files which will overwrite the files in the plugin-resources section of your installation.