SonarQube migratrion of ServiceApp/SQL Server to another Azure Subscription

Hello Team, I am using Developer SonarQube, and I got task to do migration of SonarQube (Azure AppService and Microsoft SQL server) from one Azure subscription to another

  • Docker image is used for deployment
  • I am trying to create new instances (Azure App Service and new SQL server) and exported database to import in new database
  • I have created infrastructure via Pulumi, and that is working fine, now I need to import projects from currently installation to new.

I don’t have too much experience with SonarQube, and I would be really thankful for some assistance.

Hey there.

If you’ve exported your database to import into a new database… once that’s done, you just need to hookup your SonarQube instance to that database and start it! No further need to import projects, etc. All the data is stored in the database.

Note that if you’re changing your DB Connection URL, it will likely invalidate your Server ID. Take a look at the documentation here: License administration

Hello Colin,

Thank you for your reply.

I have a few more questions, as I will change name of URL of application it self, that mean I will need to change URL in database with new one.

current server : sonarqube.somedomain.com
new server newsonarqube.somedomain.com

Do you have maybe some specific SQL queries which will change current URL with new ?

Second question, as we are using Developer license, is there way how to migrate configuration and projects ? For configuration ,will try to go through the sonarQube instances and will try to migrate manually config. But not sure what to do with projects, our projects/repos saved in Azure DevOps.

Thank you in advance :slight_smile:

Hey there.

Why will you change the URL of the application itself? All existing scan jobs will have to be pointed to the new URL (or your existing Azure DevOps Service Connection).

No need to edit the database if you’re changing the URL. Just make sure you update the general Administration > Server Base URL

When you upgrade an existing database, all configuration will carry over. Nothing to import/migrate.

Hello Colin,

I hope you are doing well.

I am changing URL because we are migrating that instance of SonarQube to another Azure Subscription, on the end, our application it self (which was used with SonarQube) will be migrated. Probably in some point in the future Azure subscription will be deleted, and resources will be relocated to new subscription.

As this URL is public, and it is configured as Azure AppService, it is not possible to have to services with the same URL.
Example :
AppService domain is : .azurewebsites.net, in that case we will not be able to use two times same URL.

On the end, I think we will do it migration in another way.

  • I configured/mirrored all configuration what I found in current SonarQube, and configured a new SonarQube

  • I configured AzureDevOps plugin, I am able to connect project with repos from AzureDevOps but because of license, don’t work, it is asking for it.

  • I will request trial Developer license,

  • When I add trial license I can add a new step to our pipelines for new SonarQube, that mean in our steps, will be two steps for SonarQube analyse , one for current, and second for new.

  • and if is everything working fine, I will request a new license from sales team, anyway, our old license Is valid till end of May, and that must be requested from your Sales in any case.

What you think, am I missing something.

Thank you for your support :wink:

If you need to change your Server ID every time you upgrade… or your Azure resources change… our contact team is going to get annoyed pretty quickly.

Ideally you would take some downtime (which is expected in a SonarQube upgrade) and use the same URL.

Developer Edition does not include staging licenses.