Skip to main content

Upgrade the IQ Server

Upgrading the IQ Server is replacing the server jar with the latest version and restarting the service. On startup, the server detects that it has been upgraded from the files in the sonatype-work directory and performs any changes. This often includes updates to the database and files on disk.

Note

Some upgrades will take longer before the server is available due to modifications made to the database. Allow for enough time for the process to complete before interrupting the service. Disable any process that may interrupt the server while the upgrade is happening to avoid corruption. In a Kubernetes environment, a liveness probe may attempt to restart the server container during the upgrade.

We strongly recommend taking a backup of your server installation and sonatype-work directories before attempting to upgrade. Rarely does an issue happen during sequential updates, however, updates spanning multiple versions may run into unforeseen issues.

Follow the instructions to Backup the IQ Server

Upgrade Instructions

Compact the Database Before the Upgrade

A long-lived database contains some percentage of empty space to support its efficient growth. If your server's database (sonatype-work/clm-server/data/ods.h2.db) is several gigabytes large, this percentage of empty space can amount to gigabytes as well. Removing this empty space, a process called compacting, can reduce the upgrade duration.

To compact your server's database:

  1. Shut down your IQ Server

  2. Execute the command java -jar nexus-iq-server-x.x.x-x.jar compact-db config.yml or equivalent for your environment

  3. You may restart your IQ Server once the above command has finished

Compacting the database is an I/O heavy operation and, depending on the size of your database and the storage performance, can take several minutes or longer. To help plan the needed maintenance window, we suggest you perform a test run of this process in a staging environment on comparable hardware using a recent backup of your installation.

Download the latest version from Download and Compatibility

  1. Update differences from your current config.yml file and use the new config.yml. Note any new default configuration settings in the new config.xml

  2. Stop the server

  3. Replace the old config.yml with the new config.yml file

  4. Copy the new server jar and change the startup scripts to reflect the new jar name

  5. Start the server

Review the release-specific upgrade instructions for your current version and any versions that follow.

Upgrading a High Availability (HA) Installation of IQ Server

Refer to the following links for details on upgrading an HA installation:

https://github.com/sonatype/nexus-iq-server-ha/tree/main/chart#upgrading

https://artifacthub.io/packages/helm/sonatype/nexus-iq-server-ha#upgrading