SonarQube database migration to different server

When we are trying to setup the new server we want to take the Database dump and migrate complete projects, users, permissions, Quality Profiles and Gates etc to the new server too. However the old server is on Sonarqube 7.9 with Postgres 9.5 version and in the new server we have setup Sonarqube 8.9 with Postgres 12 version.

When tested the database dump(from postgres 9.5) restoration on a staging server with the same version of sonarqube (8.9with postegres 12) , we are seeing below error in starting Sonarqube service

“Database needs to be migrated. Please refer to]”

Could you please help us in the best process or solution for this scenario.

Commands used in taking the dump and restoring:
Created new sonar databsewith template0
pg_dump -U postgres --encoding utf8 -F p -f sonar_sql.sql sonar

psql -U postgres -d sonar_sql < /tmp/sonar_sql.sql

Hey there.

It sounds like you’re upgrading SonarQub v7.9 to v8.9 (and if you aren’t trying to… check the version you downloaded).

And, all this message is telling you is to go follow this instruction in the upgrade guide

  1. Browse to http://yourSonarQubeServerURL/setup and follow the setup instructions
1 Like