Sonarqube -Docker

Hello,

I am trying to set up Sonarqube enterprise with a Docker container.

we need to take our current soanrqube Ent (9.9.3 LTS) on-prem backup and restore it to a New container.

Why this database error is showing? do I need to have a separate DB instance (Postgres) or can I use the existing DB in the local host?

Required information for migration .

Thanks

Hi,

Yes, you need to stand up an external database and connect your SonarQube instance to it.

 
HTH,
Ann

Hi Ann,

The Docker setup for Sonarqube and Postgres is done.

we have restored the DB backup also.

but we are not able to get our scanned projects, and reports… what backups do I need to take and restore from Sonarqube?

I went through https://docs.sonarsource.com/sonarqube/latest/instance-administration/backup-and-restore/

followed the mentioned steps by deleting es8 after DB restore. we didn’t have our scanned projects yet.

Please guide me If I am missing any steps.

Harsha

Hi Sriharsha,

To be clear, you’re saying you’ve moved your data to an external DB, connected SonarQube to that DB, and your SonarQube instance is… empty?

 
Ann

Hi Ann,

Yes, I restored the DB backup to the new Sonarqube environment, but project analyses are not showing up on the new portal.

Harsha.

Hi Harsha,

Are you absolutely sure SonarQube is connected to your external DB? There’s no yellow banner across the bottom of the page, warning you about not using H2 in production?

Because if there is a yellow banner at the bottom, you’re not connected to your restored DB.

 
Ann

Hi Ann,

Yes, Sonarqube is connected to the external DB.

Harsha

Hi Harsha,

Thanks for the screenshot.

Okay, so the Projects page is empty? What about Administration → Projects → Management?

I ask because while the Projects page is populated from Elasticsearch indices, I believe the Management page is populated directly from the DB.

 
Ann

Hi Ann,

Project Management, groups, and users are also default only, backup data not showing

Harsha

Hi Harsha,

It seems that you’re connected to an empty DB, rather than a schema that holds your restored data.

 
Ann

Hi Ann,

Ok, I will recheck this.

If we connect successfully to our backup db, will our server ID unchanged?

Harsha

Hi Harsha,

If you can manage to keep your JDBC URL unchanged, then your license should still be good.

 
HTH,
Ann