Overview

LabKey Server ships with a script for upgrading a LabKey Server running on Linux and OSX, or other UNIX-style operating systems. This script, named manual-upgrade.sh, can be used to upgrade your LabKey Server to the latest version.

How to use this script

Type "manual-upgrade.sh" with no parameters in a console window for help on the script's parameters.

The script provides a number of command line options:

Usage:
manual-upgrade.sh -l dir [-d dir] [-c dir] [-u tomcatuser] [--service|--systemctl|--catalina]

-l dir: LABKEY_HOME directory to be upgraded. This directory contains the
labkeywebapp, modules, pipeline-lib, etc directories for the existing
LabKey Server instance. (Required)

-d dir: Upgrade distribution directory: contains labkeywebapp, lib, and manual-upgrade.sh.
(default: current working directory)

-c dir: CATALINA_HOME; root of LabKey Apache Tomcat installation.

-u owner: the tomcat user account (default: current user)

--noPrompt: do not require the user to hit enter before proceeding with the install

(Web server startup/shutdown method: select one)
--service: use /etc/init.d/tomcat (default)
--systemctl: use /bin/systemctl
--catalina: use CATALINA_HOME/bin/shutdown.sh and CATALINA_HOME/bin/startup.sh

The command-line options -l, -d, and -c are required.

Example

For this example, we will assume that

  • LABKEY_HOME directory: /usr/local/labkey/labkey
  • Upgrade distribution directory: /usr/local/labkey/src/labkey/LabKey18.1-58484.70-community-bin
  • CATALINA_HOME directory: /usr/local/labkey/apps/tomcat
  • TOMCAT version: 8.5
  • Owner: tomcat
Using these assumptions, the upgrade command will be

cd /usr/local/labkey/src/labkey/LabKey18.1-58484.70-community-bin
manual-upgrade.sh -l /usr/local/labkey/labkey -d /usr/local/labkey/src/labkey/LabKey18.1-58484.70-community-bin -c /usr/local/labkey/apps/tomcat -u tomcat --service

Additional Notes

Roll back to previous version:

  • This script does not keep a backup copy of the LabKey Server java files after the upgrade. In order to install a previous version, you will need to have the LabKey Server distribution files available on your file system.
  • You can then simply execute the script again specifying the previous version's directory containing the uncompressed LabKey Server distribution files
    • Note: this will not roll back any database upgrades that have occurred and may put your server into a bad state
Backup of LabKey Server database:
  • This script does not perform a backup of your LabKey Server database.

Was this content helpful?

Log in or register an account to provide feedback


previousnext
 
expand allcollapse all