Sonar Upgrade and DB Migration

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
  • what are you trying to achieve
  • what have you tried so far to achieve this


I am fairly new to Sonar server configuration. Currently we are using Sonar 6.7.7 and MySQL as the database back end. Since both our Sonar version and MySQL is no longer supported I need to upgrade our version and migrate MySQL data to PgSQL. I was able to covert the data to PgSQL using “pgloader” and tested the data using Sonar 6.7.7-Community. But somehow when I run Sonar 8.2, Sonar seems to wipe out my data in PgSQL and it creates new tables. It does not happen when I use Sonar 6.7.7. I would like to seek advise on how can I run latest Sonar Version and also retaining the DB dump I have from MySQL.

By the way I am using Docker for Both Sonar and PgSQL.

Thank you in advanced for the help.

Hi Jimson,

Welcome to the community!

I have no experience - either real or by reputation - with pgloader. However, we’ve created a free migrator to get you off of MySQL. I suggest you give it a try and come back to us if you’re still having problems.



Thank you for checking on this. I was able to fix my issue when followed suggestion from “” to add schema value in the sonar.jdbc.url configuration for Sonar. After defining the db schema, I was able to access sonar setup and Sonar did the rest of the upgrade.

Additional Step I made is to delete “<Sonar_Home>/data/es*” when I cannot see my projects from the home page. Both steps requires Sonar to restart and apply the changes.

Thank you again for the support.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.