Table of Contents

Upgrading across multiple versions is handled automatically. However, if in your migration path you have an LTS version, you must first migrate to this LTS and then migrate to your target version.

Example 1 : 4.2 -> 6.1, migration path is 4.2 -> 4.5.7 LTS -> 5.6 LTS -> 6.1
Example 2 : 5.1 -> 5.6, migration path is 5.1 -> 5.6

How to Upgrade?

This is a generic upgrade guide, please read carefully the Upgrade Notes of your target version and of each intermediate version, if any (below).

Before you start, backup your SonarQube Database. Upgrade problems are rare, but you'll want the backup if anything does happen.

  1. Download and unzip the new SonarQube distribution in a fresh directory, let's say NEW_SONARQUBE_HOME

  2. Install the plugins compatible with your version of SonarQube: see the Compatibility Matrix

  3. Update the contents of and wrapper.conf files (in NEW_SONARQUBE_HOME/conf) with the settings of the related files in the OLD_SONARQUBE_HOME/conf directory (web server URL, database, ldap settings, etc.). Do not copy-paste the old files.
    1. If you are using the Oracle DB, copy its JDBC driver into NEW_SONARQUBE_HOME/extensions/jdbc-driver/oracle

  4. Stop your old SonarQube Server
  5. Start your new SonarQube Server
  6. Browse to http://yourSonarQubeServerURL/setup and follow the setup instructions
  7. Analyze your projects (and compute your Views if you own the Governance product) to get fresh data

Anything Else?

Database Maintenance

It is recommended to refresh your database's statistics and rebuild your database's indices once the technical upgrade is done (just before the very last step).

SonarQube as a Linux or Windows Service

If you use external configuration, such as a script or Windows Service to control your server, you'll need to update it to point to NEW_SONARQUBE_HOME.

In case you used the InstallNTService.bat to install SonarQube as a Windows Service, run the OLD_SONARQUBE_HOME/bin/.../UninstallNTService.bat before running the InstallNTService.bat of the NEW_SONARQUBE_HOME.

Release Upgrade Notes

Usually SonarQube releases come with some specific recommendations for upgrading from the previous version. You should read the upgrade notes for each version between your current version and the target version. To upgrade from a version not listed here, see Documentation for Previous Versions.

  • No labels