[1066033 views]

[]

[toggle ads]

Odi's astoundingly incomplete notes

New entries | Code

How to migrate SonarQube to Postgresql

Perform the migration on an existing SonarQube installation. You can not do it at the same time as upgrading to a newer SonarQube version!

1. Create an emtpy Postgresql DB (no password is used here, depending on settings in pg_hba.conf):
psql -U postgres
create user sonar;
create database sonarqube owner sonar;
2. Change the DB connection of the existing SonarQube installation in sonar.properties:
sonar.jdbc.username=sonar
#sonar.jdbc.password=
sonar.jdbc.url=jdbc:postgresql://localhost/sonarqube?currentSchema=public
3. Start up the SonarQube instance so that it creates the DB schema in Postgresql.

4. Shut down the SonarQube instance again for migration.

5. Delete the sonar/data/es6/nodes folder.

4. Run the mysql-migrator utility.

5. Startup the SonarQube instance again.

6. If you want to update to a newer SonarQube version then do that now.


posted on 2019-08-15 09:47 CEST in Code | 0 comments | permalink