-
which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
SonarQube Developer Edition
Version: 7.9.1.27448 -
what are you trying to achieve
As we are trying to host our SonarQube instance in our Kubernetes cluster instead of hosting it in a mere docker container, we need to migrate all the existing data in our current SonarQube instance to the new one.
We will be using the exact same version of SonarQube and same version of PostgreSQL, but we will have to change the connection string (URL) to the database, which will in turn change the originalServerID
. -
what have you tried so far to achieve this
We have tried the following:
- Generate a dump from our existing database (
pg_dump
) and load it to our new database before starting SonarQube
This resulted in the situation where I can check all the projects and scan results fromAdministration > Projects > Management
but theProjects
page is not showing any project. Also,License Manager
warns us that there is mismatch between theServerID
that the registered license key was issued for and the currentServerID
, which should be solved by reissuing a license key and set that up again. We are not sure if setting a newly issued license key will solve the issue of theProjects
page not showing any projects. - Try using the following tool: https://github.com/awltech/sonar-data-migrator
This didn’t really do anything because it seems that the tool assumed that we run scans of the same projects that we have in the old instance before running the tool. However, we have tons of projects with multiple branch analyses in the old one, and it is not feasible at this point to run the same scans again in the new instance.
- Generate a dump from our existing database (
With that said, our questions are
- What is the best way to migrate existing data to a new instance when we are not upgrading SonarQube version but only changing
ServerID
? - What needs to be done for the
Projects
page to show projects that are only visible inAdministration > Projects > Management
in addition to the security settings?
I appreciate your support!