We have sonarqube version 7.9.3-community docker image deployed in kubernetes using helm chart oteemocharts/sonarqube (version: 9.9.0).
We tried to upgrade the docker image from 7.9.3-community to 8.2-community but when the new pod is deployed all the projects and user accounts are wiped out. And when we downgrade to 7.9.3-community we are seeing the user accounts again.
Can someone please tell us how to upgrade to version > 9.X by keeping all the existing data like projects, tokens and user accounts?
all data that is used in SonarQube is hold in the database connected. When you are upgrading your installation and connect it to the same database, it will detect that there is a older data structure present and will wait for you to manually trigger a migration (migration here to restructure the old data in the database to the current required structure).
so to answer your question i would like you to check the database connection did not change and check our what you should take into consideration while upgrading here (always backup your data) and our actual upgrade guide here.
I’ve read the documentation and it seems like we need to upgrade from 7.9.3-community to an LTS version of 7.X sonarqube before upgrading to version 8.X…can you please tell me what’s the correct tag to upgrade to? I can’t find a 7.9.3-lts tag in the dockerhub image repository.
After creating a new 8.2-community pod I tried to go to the /setup endpoint and it said Database is up-to-date
I can also confirm that the database connection did not change because the only change in the helm release the image tag and everything else is the same so we know that the newer version of sonarqube pod is using the same database as the older version of sonarqube pod.
we will try to use the above helm chart once we finish the sonarqube upgrade.
We noticed that when we upgraded to oteemocharts/sonarqube (version: 9.9.0), variables were renamed from SONARQUBE_JDBC_PASSWORD to SONAR_JDBC_PASSWORD which switched us to embedded DB. After adding the correct vars we were able to upgrade sonarqube.
I have one more question, we now have data in 2 places RDS postgresql (version 11.12) and also in local H2 database, how do we add data from embedded H2 database to already existing data in RDS postgresql?
FYI: RDS holds all the data for more than a year and local H2 database holds the data from the last 2-3 weeks