Performing the upgrade
Once you have determined your upgrade path and tested your upgrade, you can perform your SonarQube server upgrade.
Now that you have determined your upgrade path and tested your upgrade, you can perform your upgrade.
Before you start
Consider the following before starting your upgrade:
SonarQube releases come with some specific recommendations for upgrading from the previous version. You should read the Release upgrade notes for each version between your current version and the target version.
Database disk usage recommendations: During your upgrade, tables may be duplicated to speed up the migration process. This could cause your database disk usage to temporarily increase to as much as double the normal usage. Because of this, we recommend that your database disk usage is below 50% before starting a migration.
Upgrading a ZIP file instance
Before you upgrade, make sure you know how to Installing SonarQube from the ZIP file from the ZIP file and check that your environment Prerequisites and overview of the version you’re upgrading to.
To upgrade from the ZIP file:
Download and unzip the SonarQube distribution of your edition in a fresh directory, let’s say
<newSonarqubeHome>
.If you’re using third-party plugins, Manually install plugins that are compatible with your version of SonarQube. Use the Plugin version matrix to ensure that the versions you install are compatible with your server version. Simply copying plugins from the old server to the new is not recommended; incompatible or duplicate plugins could cause startup errors. Analysis of all languages provided by your edition is available by default without plugins.
Update the contents of
sonar.properties
file (in<newSonarqubeHome>/conf
) with the settings in the<oldSonarqubeHome>/conf
directory (web server URL, database, ldap settings, etc.). Do not copy-paste the old files. If you are using the Oracle DB, copy its JDBC driver into<newSonarqubeHome>/extensions/jdbc-driver/oracle
.Stop your old SonarQube Server.
Start your new SonarQube Server.
Browse to
http://yourSonarQubeServerURL/setup
and follow the setup instructions.Reanalyze your projects to get fresh data.
Upgrading a Docker image instance
To upgrade SonarQube using the Docker image:
Stop and remove the existing SonarQube container (a restart from the UI is not enough as the environment variables are only evaluated during the first run, not during a restart):
$ docker stop <container_id>
$ docker rm <container_id>
2. Run Docker.
$> docker run -d --name sonarqube \
-p 9000:9000 \
-e SONAR_JDBC_URL=... \
-e SONAR_JDBC_USERNAME=... \
-e SONAR_JDBC_PASSWORD=... \
-v sonarqube_data:/opt/sonarqube/data \
-v sonarqube_extensions:/opt/sonarqube/extensions \
-v sonarqube_logs:/opt/sonarqube/logs \
<image_name>
3. Go to http://yourSonarQubeServerURL/setup
and follow the setup instructions.
4. Reanalyze your projects to get fresh data.
Upgrading a Helm chart instance
Please verify that any custom configurations or custom values.yaml
files contain only parameters that are still compatible with the targeted chart, and adjust them if needed. Some default parameters may have changed between versions of the chart.
Upgrading from a ZIP file instance to a Docker instance
To migrate from the ZIP file to Docker:
Configure your Docker instance to point to your existing database.
Shut down your ZIP instance.
Start your Docker instance.
Last updated
Was this helpful?