Need help migrating postgre-db from 7.1 to the latest version of sonarqube

So my team requires assistance in migrating data from 7.1 to the latest version of Sonarqube. Our current environment is that we have Sonarqube and postgre in two separate docker containers. The Sonarqube container is on 7.1 and what I found is that is still utilizing the embedded database, even though in the sonar properties file, the embedded database is commented out. Therefore, how can I make Sonarqube point to the right database?

Hi Robert, welcome to the SonarSource Community!

Since we didn’t have any official Docker images at the time of SonarQube 7.1, I am guessing you are using a custom container. FYI, we’ve had official support for Docker containers since the past several SonarQube 8.x releases.

Configuring SonarQube to point to the correct database in 7.x hinged on the database-related properties being specified within the file: sonar.jdbc.url and the pair of sonar.jdbc.username and sonar.jdbc.password. If these values were not configured, the fallback embedded database would have been used.

There is no migration mechanism involving the embedded database. Sadly this means there’s no way to migrate or preserve your existing analysis data. The good news is it greatly simplifies your upgrade path.

My suggestion is that you simply replace your SonarQube container with a new one based on the latest 8.6 image and be sure to follow our instructions for setting it up using Docker. Note that in our current Docker-based installations, the config file is no longer used in favor of passing environment variables (including all the JDBC connection info which get configured using variables named like SONAR_JDBC_*). These variables are where you can specify the connection info for your PostgreSQL container.

Thank you again for your insight! I just wanted to add that we are coming from postgres and a native install, and are trying to upgrade to 8.6. Again thank you!