Upgrading from an LTS which is not the latest patch-version in its major version

upgrade

(Ewout) #1

Hi,

I’m helping out on upgrading a sonarqube instance, but I’m new to sonarqube myself.

On https://docs.sonarqube.org/display/SONAR/Upgrading it is mentioned that one needs to upgrade to intermediate LTS versions first, before upgrading to the target version, if any of course.

Client needs to upgrade from 5.6.6 to 7.3, which of the two below will be my upgrade path knowing that 5.6 is a LTS?

  • 5.6.6 > 5.6.7 LTS > 6.7.5 LTS > 7.3
  • 5.6.6 > 6.7.5 LTS > 7.3

Or more in general, if one is not on the latest patch-version of a certain LTS, do you first need to upgrade to the latest patch-version of that same LTS version, or can one directly safely jump to the next LTS? (the Release Notes and linked tickets at https://jira.sonarsource.com/jira/secure/ReleaseNote.jspa?projectId=10930&version=13778 don’t seem to indicate breaking changes for 5.6.7 and theoretically that should be the case for a patch-version-upgrade; just checking to be sure)


(Nicolas Bontoux) #2

Hi,

That’s the one !

And to answer your broader question:

No need to first upgrade to the latest bug-fix of the LTS you’re in. The important is that there is no LTS branch between the version you’re running, and the latest LTS.

Note: once on an LTS branch, it’s obviously a good practice to keep a close eye at latest bug-fix versions and benefit from them to avoid any bad surprise.


(Ewout) #3

Hi,

many thanks for the quick response!


(Eric) #4

I have a similar question but I am using even older version (4.5.6) To verify, I can move safely from 4.5.6 -> 5.6.6 -> 6.7.5 LTS?

I have already found out the hard way that you can’t go from 4.5.6 to 6.7.5 as the databases don’t like it.


(G Ann Campbell) #5

Hi,

Yes, the path you’ve outlined is both required and safe.

 
Ann


(Eric) #6

Ann,

I was a little mistaken I am using 4.5.7. Your reply above is still true?


(Eric) #7

Also the only download that is on the webpage is 5.6.7. Is this one safe to use?


(G Ann Campbell) #8

Yes, and yes. :slight_smile:

The point is to hit a version of the LTS, so 4.5.* to 5.6.*, and so on.


(Eric) #9

Is there a tool that I need to use to migrate/export the database? So, if my current database schema is cloned/exported to a clean database I should be able to connect to it with the 5.6.* application. The have it connect and make a scan of current code, then repeat the previous steps to get it to the 6.7.* version.

Just making sure that I only have to do this once not multiple times.


(G Ann Campbell) #10

Uhm… I don’t fully understand the question, so I’m going to punt at answering.

  • You should always make a database backup before upgrading (as described in the docs)
  • Point the new instance at your old database and once you’ve hit the button (see the docs) SonarQube will handle upgrading its own database.

 
Ann


(Eric) #11

Ann,

You have clarified my question. Thanks. So I can point the new instance of SonarQube to the old database(not the exported schema) and it will take care of the rest? It will upgrade its database and hopefully not lose anything?

or can I take an export of the database and point SQ to it and have it do its magic?


(G Ann Campbell) #12

Making a backup is a fail-safe.

SonarQube will take care of the rest, once you actually hit the button to start the upgrade. Where to find the button is detailed in the docs (link in previous post).


(Eric) #13

Ann,

Thank you for all of your help with this. I finally managed to get SQ to see the database and do its behind the scenes magic and upgrade.