Backup and restore of sonarqube database/metadata

Hi Matt,

  1. Not being licensed will only prevent you from running fresh analysis. If all you’re looking to do is bring SonarQube up in the new location and verify it runs, this should be possible without a new license. Then request the new license once you think your situation has settled and your configuration (specifically the database location) won’t be changing.
  2. We don’t require or advocate for any particular database backup strategy, as long as transactional integrity is maintained.
  3. You’ll certainly want to backup and either restore or recreate the configurations you’ve specified in your sonar.properties file. Custom or 3rd party plugins you’ve installed will also need to be restored if you still want to run them. I.e. you should know if you added something there that needs to be preserved.

SonarQube 7.1 is quite old and no longer supported. I’d strongly encourage you to plan as part of this move to install our LTS version 7.9.4. Follow the upgrade guide if you’re interested. This could also simplify your backup/restore process. Rather than worrying about restoring any SonarQube files, simply install SonarQube 7.9 Developer Edition, copy your sonar.properties file into the conf directory, adjust the database properties (sonar.jdbc.*) to match your restored database location, and the database contents will be upgraded at first startup. I’d certainly recommend you keep a copy of your database backup should you choose to go this route.

2 Likes