Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info
iconfalse
titleTable of Contents
Table of Contents

How to Upgrade

This guide describes how to Note that you can directly upgrade from one version of Sonar to a later version.

...

to another. For example, to upgrade from version 3.1 to version 3.5, it is not necessary to first upgrade to version 3.2, then to version 3.3, and so on.

  1. Read the upgrade notes below for each version
  2. Stop Sonarthe SonarQube server:

    Code Block
    bin/<SYSTEM>/sonar stop
  3. Download and unzip Sonar the new SonarQube distribution in a fresh directory, let's say {$NEWNEW_SONARSONARQUBE_HOME}
  4. Update the content of the sonar.properties and wrapper.conf files located in the {$NEW_SONARthe NEW_SONARQUBE_HOME}/conf directory according of with the content of the related files in the {$OLD_SONARthe OLD_SONARQUBE_HOME}/conf directory (web server URL, database settings, etc.). Do not copy-paste the old files.
  5. Copy the directories OLD_SONARQUBE_HOME/extensions/plugins and extensions/rules from {$OLD_SONAR_HOME} to {$NEW_SONAR_HOME} (if you see problems while starting, try to remove the copied plugins from the extensions/plugins-directory and reinstall the plugins manually via the webinterface) directory into NEW_SONARQUBE_HOME/extensions/plugins.
    (warning) Check for plugins compatibility and upgrade manually the plugins if necessary: see Compatibility Matrix
  6. If a custom JDBC driver is used, copy it into {$NEWNEW_SONARSONARQUBE_HOME}/extensions/jdbc-driver/<dialect>
  7. Doing a database backup is recommended
  8. If Sonar is deployed on a Tomcat or Jetty server, build the WAR file by executing the script {$NEW_SONAR_HOME}/war/build-war
  9. Start server (or deploy war on server):

    Code BlockBack up your database
  10. Start the web server:

    Code Block
     NEW_SONARQUBE_HOME/bin/<SYSTEM>/sonar start
  11. Browse to http://localhost:9000/setup (replace "localhost:9000" by your own URL) and follow the setup instructions
  12. Analyze your projects to get fresh measures

 

Note

Upgrading can take a while depending on the size of projects portfolio. To monitor the process, check the logs and the console.

Upgrade is completed when an analysis has been run on project. Only at that point will you get new functionality working for sure.

How to Roll Back

If, for some reasons, your upgrade failed, you can roll back by:

  1. Restoring your backed up database
  2. Updating the OLD_SONARQUBE_HOME/conf/sonar.properties configuration file to link to the restored database
  3. Restarting the previous version of the web server:

    Code Block
     OLD_SONARQUBE_HOME/bin/<SYSTEM>/sonar start

Release Upgrade Notes

Usually Sonar the SonarQube releases come with some specific recommendations for upgrading from the previous version. You have to read the upgrade notes for all versions between your current version and the target version.

...