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 https://docs.sonarqube.org/latest/setup/upgrading]”
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