I am planning to migrate our SonarQube instance (version 10.6.0) along with its PostgreSQL database (version 14.18) from our current virtual machine to a new one. Both SonarQube and PostgreSQL are currently running on the same VM.
To ensure a smooth and successful migration with minimal downtime (we can tolerate downtime), I would appreciate guidance . My primary goal is to have an identical SonarQube setup on the new server, preserving all project data, configurations, and user information.
Typically, for PostgreSQL, you will simply use Postgres tools like pg_dump on the old VM and pg_restore on the new one to copy data. Don’t forget to vaccum and reindex after the fact.
Once the database is migrated, install the same SonarQube version on the new machine, point SonarQube to the restored database (this has all the data, like project data, config and users), and start the service. Don’t forget to update your DNS so users are directed to the new server.
If you want to be extra careful, treat the process like an upgrade: verify all plugins and customizations are migrated, and thoroughly test the new instance before the final switch.
Only the latest version of SonarQube Community Build is considered active. You’ll also want to plan an upgrade during/after the mgiration.