Migrating to a new server with enterprise license trying to export and import all my projects

I was able to get the new license up on RHEL9 our community edition was on RHEL 7.9 which is now EOL . I did a pg_dump and pg_restore. I restored the PostgreSQL database called sonar into the new sonarqube running Postgresql 13 and performed and update to the database via the admin GUI. via https://sonarqube_server/setup.

I don’t see any of the 55 project on the main project page Can you guide me on what I need to do to get all my project visible on the main projects page on the new license server.
I am provided more details here see below:

CE version is sonarqube-10.4.1.88267 the Postgresql DB version is 9
new license server version is sonarqube-10.6.0.92116 the PostgreSQL DB is version 13.

I was able to place all 55 zip files into the import directory and it appear something worked as I see these 55 projects at https://sonarqube_server/projects_management. But the main projects page is empty. I need the new SonarQube licensed server too look similar to the Community Edition with has all 55 project on the main Project home page. Please let me know if you have more questions.

Hi,

Welcome to the community!

I’m a bit confused at this point.

It seems that you’ve both

  • imported a SonarQube DB backup into your new Postgres database
  • used project move to import projects one by one into your new instance

?

 
Ann

I updated the ticket and made it more clearer hopefully you can help
TY
-Frank

Hi Frank,

I’m still confused. :sweat_smile:

You shouldn’t need to both:

and

I see that you’re trying to upgrade both Postgres and SonarQube at the same time. This will be easier if you do this step by step.

My recommendation:

  • Clean out the SonarQube schema in Postgres 13
  • Do a fresh dump/restore
  • You now have your SonarQube 10.4 data replicated to Postgres 13. Point your SonarQube 10.4 instance at it and make sure everything comes up okay
  • Now you can shut down SQ 10.4 and point 10.6 at Postgres 13.
  • You’ll need to go to /setup to run the upgrade
  • You should be at :tada: :confetti_ball: at this point

 
HTH,
Ann

Okay let me try and I will let you know

Okay to confirm your recommendation
Database Operations:

  1. I will truncate the sonar database leave the table structure in place on PostgreSQL 13
  2. Perform a fresh dump/restore from old (CE) to new servers (LE)
  3. Run /setup to upgrade the dataset in PostgreSQL 13

One quick question when the zip file are placed in the import directory are they read automatically when I restart sonarqube (LE) ?

Hi,

When you restore into Postgres 13, that should take care of the table structure for you. So, wipe out the schema completely.

No. No, no, no, no, no.

No zip files.

The only zip file is the SonarQube distribution. You don’t need project zip files because the data will already be there from the dump/restore.

 
Ann

Okay thanks I glad I asked :slight_smile:

1 Like

We were able to successfully migrate to the licensed version of sonarqube on RHEL9. One thing not mention is that we needed to remove the elasticsearch temp and cache to see all the projects and issues.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.