# SonarQube 6.7.4 Upgrade to 8.9.6 LTS inclluding MYSQL to Postgres migration

**URL:** <https://community.sonarsource.com/t/sonarqube-6-7-4-upgrade-to-8-9-6-lts-inclluding-mysql-to-postgres-migration/56589>\
**Category:** SonarQube Server / Community Build\
**Created:** [January 18, 2022, 6:26pm UTC](https://community.sonarsource.com/t/sonarqube-6-7-4-upgrade-to-8-9-6-lts-inclluding-mysql-to-postgres-migration/56589 "2022-01-18T18:26:13Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![zservati](https://avatars.discourse-cdn.com/v4/letter/z/e19adc/32.png) [@zservati](https://community.sonarsource.com/u/zservati)\
**Post date:** [January 18, 2022, 6:26pm UTC](https://community.sonarsource.com/t/sonarqube-6-7-4-upgrade-to-8-9-6-lts-inclluding-mysql-to-postgres-migration/56589/1 "2022-01-18T18:26:13Z")

</div>

Hi,  
We need to upgrade from 6.7.4 to 8.9.6 LTS, which includes migrating from MYSQL to Postgres. From what I have gathered, there are two tools for migrating the data from existing mysql DB to new Postgres DB. One is mysql-migrator, and the other which comes with SonarSource support, is DB-Copy ([SonarQube DB Copy Tool | SonarQube Docs](https://docs.sonarqube.org/latest/instance-administration/db-copy/)).  
I like to know which one is recommended, there is not a whole lot of documentation on mysql-migrator.  
Also what would be the cost of SonarSource? We have two instances of sonarqube.

---

<div class="post-metadata">

**Author:** ![Carine\_Bayon](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/carine_bayon/32/3223_2.png) [@Carine\_Bayon](https://community.sonarsource.com/u/Carine_Bayon)\
**Post date:** [January 18, 2022, 7:01pm UTC](https://community.sonarsource.com/t/sonarqube-6-7-4-upgrade-to-8-9-6-lts-inclluding-mysql-to-postgres-migration/56589/2 "2022-01-18T19:01:21Z")

</div>

Hi @zservati

There are 2 things in your post : upgrade and DB change.

To upgrade from 6.7 to 8.9, you need to go through this path : 6.7 → 7.9 ex-LTS → 8.9.6 current LTS.  
As mentioned [here](https://docs.sonarqube.org/latest/setup/before-you-upgrade/), please read carefully the [notes](https://docs.sonarqube.org/latest/setup/lts-to-lts-upgrade-notes/) before upgrading to avoid any surprises 🙂

> [@SonarQube 8.9 LTS released](https://community.sonarsource.com/t/sonarqube-8-9-lts-released/42730):
>
> Hi all, SonarSource is thrilled to announce the release of SonarQube 8.9, the new LTS! tada tada In the [official announcement](https://www.sonarqube.org/sonarqube-8-9-lts/) you’ll find a summary of all the new features since the previous LTS. We’ve delivered a lot in the 8-series, so you probably want to go through the highlights there, to see all the great features we’ve worked on since the previous LTS, and how it all comes together with new security features, deeper integration with on-premise and in-cloud code repository platforms …

For your DB migration, I encourage you to read this old post that was published when MySQL support went to an end : [End of Life of MySQL Support](https://community.sonarsource.com/t/end-of-life-of-mysql-support/8667)  
You will find the requested information.  
The tool to be used is mysql-migrator.

Hope this will help,  
Have a nice journey through SonarQube versions and happy to see you soon on 8.9.6 LTS!

Carine

---

<div class="post-metadata">

**Author:** ![zservati](https://avatars.discourse-cdn.com/v4/letter/z/e19adc/32.png) [@zservati](https://community.sonarsource.com/u/zservati)\
**Post date:** [January 18, 2022, 10:06pm UTC](https://community.sonarsource.com/t/sonarqube-6-7-4-upgrade-to-8-9-6-lts-inclluding-mysql-to-postgres-migration/56589/3 "2022-01-18T22:06:51Z")

</div>

Thhank you. What version of PostGres do we need to installed? Is there any document for PostGres installation including hardware requirements?

---

<div class="post-metadata">

**Author:** ![Carine\_Bayon](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/carine_bayon/32/3223_2.png) [@Carine\_Bayon](https://community.sonarsource.com/u/Carine_Bayon)\
**Post date:** [January 19, 2022, 8:04am UTC](https://community.sonarsource.com/t/sonarqube-6-7-4-upgrade-to-8-9-6-lts-inclluding-mysql-to-postgres-migration/56589/4 "2022-01-19T08:04:40Z")

</div>

Hi

you’ll find all requirements here: [Prerequisites and Overview | SonarQube Docs](https://docs.sonarqube.org/latest/requirements/requirements/)  
including PostGreSQL versions.  
Carine

---

<div class="post-metadata">

**Author:** ![zservati](https://avatars.discourse-cdn.com/v4/letter/z/e19adc/32.png) [@zservati](https://community.sonarsource.com/u/zservati)\
**Post date:** [January 20, 2022, 12:31am UTC](https://community.sonarsource.com/t/sonarqube-6-7-4-upgrade-to-8-9-6-lts-inclluding-mysql-to-postgres-migration/56589/5 "2022-01-20T00:31:01Z")

</div>

Thanks.I am trying to download 7.9.6 on [Download | SonarQube](https://www.sonarqube.org/downloads/) page, but it cannot connect to the server. Is there an issue with the download link.

---

<div class="post-metadata">

**Author:** ![Joe](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/joe/32/14820_2.png) [@Joe](https://community.sonarsource.com/u/Joe)\
**Post date:** [January 20, 2022, 12:53am UTC](https://community.sonarsource.com/t/sonarqube-6-7-4-upgrade-to-8-9-6-lts-inclluding-mysql-to-postgres-migration/56589/6 "2022-01-20T00:53:39Z")

</div>

Hi @zservati ,

On the [Downloads](https://www.sonarqube.org/downloads/) page, scroll down to “Show all versions” buttons and click on it. Then scroll down to SonarQube 7.9.6 and click on the edition you need.

If that doesn’t work, you can download directly from here: [https://binaries.sonarsource.com/](https://binaries.sonarsource.com/)

Documentation for mysql-migration is here: [GitHub - SonarSource/mysql-migrator: Command line tool to migrate MySQL database of SonarQube 6.7-7.8 to non-MySQL](https://github.com/SonarSource/mysql-migrator)

---

<div class="post-metadata">

**Author:** ![zservati](https://avatars.discourse-cdn.com/v4/letter/z/e19adc/32.png) [@zservati](https://community.sonarsource.com/u/zservati)\
**Post date:** [January 24, 2022, 6:10pm UTC](https://community.sonarsource.com/t/sonarqube-6-7-4-upgrade-to-8-9-6-lts-inclluding-mysql-to-postgres-migration/56589/7 "2022-01-24T18:10:18Z")

</div>

I have another question. To migrate our mysql DB to PostGres with the existing SQ 6.7.4, from the documentation I see I need to install PostGes 9.x (?) and after having SQ 6.7 working with the PostGres, then to upgrade SQ 6.7.4 to 7.9 LTS, it seems I need to upgrade DB to PostGres 10. Is that correct?

---

<div class="post-metadata">

**Author:** ![Joe](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/joe/32/14820_2.png) [@Joe](https://community.sonarsource.com/u/Joe)\
**Post date:** [January 24, 2022, 8:27pm UTC](https://community.sonarsource.com/t/sonarqube-6-7-4-upgrade-to-8-9-6-lts-inclluding-mysql-to-postgres-migration/56589/8 "2022-01-24T20:27:56Z")

</div>

I suggest installing just PostgreSQL 9.6 only.

Make sure to install PostgreSQL 9.6 with SonarQube 6.7.4, because you can stay on PostgreSQL 9.6 for the SonarQube 7.9 upgrade and the SonarQube 8.9 LTS upgrade. Then you can upgrade PostgreSQL to a higher version if you want.

---

<div class="post-metadata">

**Author:** ![zservati](https://avatars.discourse-cdn.com/v4/letter/z/e19adc/32.png) [@zservati](https://community.sonarsource.com/u/zservati)\
**Post date:** [January 24, 2022, 9:45pm UTC](https://community.sonarsource.com/t/sonarqube-6-7-4-upgrade-to-8-9-6-lts-inclluding-mysql-to-postgres-migration/56589/9 "2022-01-24T21:45:15Z")

</div>

Thanks.

---

<div class="post-metadata">

**Author:** ![zservati](https://avatars.discourse-cdn.com/v4/letter/z/e19adc/32.png) [@zservati](https://community.sonarsource.com/u/zservati)\
**Post date:** [January 24, 2022, 9:52pm UTC](https://community.sonarsource.com/t/sonarqube-6-7-4-upgrade-to-8-9-6-lts-inclluding-mysql-to-postgres-migration/56589/10 "2022-01-24T21:52:09Z")

</div>

I see some people have been using PostGres 10, and also 9.6 since to be EOL so we need to upgrade.

---

<div class="post-metadata">

**Author:** ![Joe](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/joe/32/14820_2.png) [@Joe](https://community.sonarsource.com/u/Joe)\
**Post date:** [January 24, 2022, 10:01pm UTC](https://community.sonarsource.com/t/sonarqube-6-7-4-upgrade-to-8-9-6-lts-inclluding-mysql-to-postgres-migration/56589/11 "2022-01-24T22:01:28Z")

</div>

Yes, I would upgrade to at least PostgreSQL 10 after you finish the SonarQube upgrades. Make sure to take DB backups and test your upgrades in a lower (test/staging) environment if possible.

---

<div class="post-metadata">

**Author:** ![zservati](https://avatars.discourse-cdn.com/v4/letter/z/e19adc/32.png) [@zservati](https://community.sonarsource.com/u/zservati)\
**Post date:** [January 24, 2022, 10:50pm UTC](https://community.sonarsource.com/t/sonarqube-6-7-4-upgrade-to-8-9-6-lts-inclluding-mysql-to-postgres-migration/56589/12 "2022-01-24T22:50:48Z")

</div>

I will, thank you!

---

<div class="post-metadata">

**Author:** ![zservati](https://avatars.discourse-cdn.com/v4/letter/z/e19adc/32.png) [@zservati](https://community.sonarsource.com/u/zservati)\
**Post date:** [February 7, 2022, 7:22pm UTC](https://community.sonarsource.com/t/sonarqube-6-7-4-upgrade-to-8-9-6-lts-inclluding-mysql-to-postgres-migration/56589/13 "2022-02-07T19:22:34Z")

</div>

Hello, I upgrade our existing mysql db with sonarqube 6.7.4 to PostGres 9.3, and transferred the data using mysql-migrator by following the steps on the documentation, including removing the data/es5 dir. Everything went well, and the data got copied successfully, but after logging into the sonarqube, and click on projects tab, I cannot see any project, it’s basically empty. I am also not to be able to search for any project, including the one that got upload after migration. However under administration/project tab I see the projects. Would you please give me some insights as what might have gone wrong. Thanks

---

<div class="post-metadata">

**Author:** ![Joe](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/joe/32/14820_2.png) [@Joe](https://community.sonarsource.com/u/Joe)\
**Post date:** [February 7, 2022, 7:35pm UTC](https://community.sonarsource.com/t/sonarqube-6-7-4-upgrade-to-8-9-6-lts-inclluding-mysql-to-postgres-migration/56589/14 "2022-02-07T19:35:11Z")

</div>

Please verify that you have set the correct `sonar.jdbc.url` in your sonar.properties file. Please verify there is data inside that database.

Please zip and attach the $SQ\_HOME/logs folder here if still need assistance.

---

<div class="post-metadata">

**Author:** ![zservati](https://avatars.discourse-cdn.com/v4/letter/z/e19adc/32.png) [@zservati](https://community.sonarsource.com/u/zservati)\
**Post date:** [February 7, 2022, 7:40pm UTC](https://community.sonarsource.com/t/sonarqube-6-7-4-upgrade-to-8-9-6-lts-inclluding-mysql-to-postgres-migration/56589/15 "2022-02-07T19:40:32Z")

</div>

[sonar.log](https://community.sonarsource.com/uploads/short-url/lwWFnzonjoKpNBkSaL7Csv25YRh.log) (5.6 KB)

---

<div class="post-metadata">

**Author:** ![zservati](https://avatars.discourse-cdn.com/v4/letter/z/e19adc/32.png) [@zservati](https://community.sonarsource.com/u/zservati)\
**Post date:** [February 7, 2022, 7:42pm UTC](https://community.sonarsource.com/t/sonarqube-6-7-4-upgrade-to-8-9-6-lts-inclluding-mysql-to-postgres-migration/56589/16 "2022-02-07T19:42:33Z")

</div>

Please see the sonar.log in the attachment above. I have verified that the database is not empty and table size corresponds to the mysql db. Also as I mentioned when click under administration/projects tab I can see projects. However the project search is not working either. I have already verifed the jdbc url and user/pw. They are all correct and no db connection issue. I have been able to upload a project to the sonarqube, and been able to access it via https:///dashboard/index/.

---

<div class="post-metadata">

**Author:** ![zservati](https://avatars.discourse-cdn.com/v4/letter/z/e19adc/32.png) [@zservati](https://community.sonarsource.com/u/zservati)\
**Post date:** [February 7, 2022, 8:13pm UTC](https://community.sonarsource.com/t/sonarqube-6-7-4-upgrade-to-8-9-6-lts-inclluding-mysql-to-postgres-migration/56589/17 "2022-02-07T20:13:31Z")

</div>

I believe I resolved the issue. I stopped sonarqube, and I deleted the data/es5 folder under sonarqube home, which caused sonarqube to rebuilt the indices.  
So the delete of data/es5 needs to be done after copying data via mysql-migrator.  
Is that correct?

---

<div class="post-metadata">

**Author:** ![Joe](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/joe/32/14820_2.png) [@Joe](https://community.sonarsource.com/u/Joe)\
**Post date:** [February 7, 2022, 9:31pm UTC](https://community.sonarsource.com/t/sonarqube-6-7-4-upgrade-to-8-9-6-lts-inclluding-mysql-to-postgres-migration/56589/18 "2022-02-07T21:31:37Z")

</div>

Yes, you should reindex your projects after an upgrade or a major change like your mySql to PostgreSQL conversion.

---

<div class="post-metadata">

**Author:** ![zservati](https://avatars.discourse-cdn.com/v4/letter/z/e19adc/32.png) [@zservati](https://community.sonarsource.com/u/zservati)\
**Post date:** [February 7, 2022, 9:43pm UTC](https://community.sonarsource.com/t/sonarqube-6-7-4-upgrade-to-8-9-6-lts-inclluding-mysql-to-postgres-migration/56589/19 "2022-02-07T21:43:58Z")

</div>

Thank you!

---

<div class="post-metadata">

**Author:** ![zservati](https://avatars.discourse-cdn.com/v4/letter/z/e19adc/32.png) [@zservati](https://community.sonarsource.com/u/zservati)\
**Post date:** [February 8, 2022, 6:52pm UTC](https://community.sonarsource.com/t/sonarqube-6-7-4-upgrade-to-8-9-6-lts-inclluding-mysql-to-postgres-migration/56589/20 "2022-02-08T18:52:51Z")

</div>

Hi, Finally the db migration to postgre is done. Now I am ready to upgrade from 6.7.4 to 7.9 LTS, as part of the migration to 8.9LTS.  
I like to know if the quality profiles, web hooks and etc all will be copied as part of the upgrade. All I have seen in the upgrade notes is after copying the configuration, then start the server, and then go to the setup URL. and then need to upgrade the plugins as needed. Is there anything else.

[Next page](https://community.sonarsource.com/t/sonarqube-6-7-4-upgrade-to-8-9-6-lts-inclluding-mysql-to-postgres-migration/56589.md?page=2)
