Restore backup of Production Database for use in Test environment, server id changes?

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    SonarQube v6.7.6 LTS on both servers: Production & Test
    Both Server configured with Apache HTTPD front-end setup with reverse proxy & SSL
    Both Servers configured exactly the same, except of course database instance and server names
    Both Servers are Red Hat Enterprise Linux Server release 7.6 (Maipo)
    Both Servers utilize Oracle Database v12.2:
    sonarqbp - Production Database Instance
    sonarqbt - Test Database Instance

  • what are you trying to achieve
    Duplicating Production Environment in Test Environment

  • what have you tried so far to achieve this

    • Backed up oracle database sonarqbp (production instance) and restore into sonarqbt (test instance).
    • Removed data/es5 folder and let SonarQUbe rebuild it.
    • Re-applied Test SonarQube license to Test SonarQube application when started.

Getting:

Edition Data Center Edition

Type TEST

Expiration March 9, 2020

Server ID 76564E69-AWfLudG4Znk2XyDi-6sk

Invalid server ID. Please provide a license for the following server ID: 76564E69-AWfN3BbkCYqlOlKpsvso

Do I need to ask Support for a new license for my Test Instance, even though the Server itself, nor the Database type and instance ID has not changed?

Thanks,
John B

Hi John,

You will need to get a new license, although I believe it’s your sales contact, not Support, that will supply it.

 
Ann

Hello there!

I seem to have a similar problem but the other way around: I want to migrate my SQ DE instance from my little DevOps sandbox to our production environment.

For that purpose I

  1. pg_dump the entire database into an SQL file
  2. docker-compose up a new SQ DE instance
  3. stop the application container (leaving the Postgres database container running)
  4. restore the database via psql
  5. start the application container again.

After that everything seems fine but the server ID has changed. According to the documentation on the License Manager module that may have happened because DB connection settings have changed. I’m not sure if that is the case because initial setup was some nine months ago. :wink:

Are there other situations in which the server ID changes or is DB configuration the one and only thing that triggers it? If so, I will contact sales to update my license. I could do that right away but would love to avoid generating unnecessary work because I can not guarantee that I won’t have to repeat the process. :innocent:

Thank you very much

Sebastian

Hi Sebastian,

IIRC, it’s only moving the database that’s going to cause a problem with your license.

 
Ann