# Copying data between SonarQube Environments

**URL:** <https://community.sonarsource.com/t/copying-data-between-sonarqube-environments/92097>\
**Category:** SonarQube Server / Community Build\
**Tags:** db-copy, sonarqube\
**Created:** [June 6, 2023, 7:17pm UTC](https://community.sonarsource.com/t/copying-data-between-sonarqube-environments/92097 "2023-06-06T19:17:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nbonham](https://avatars.discourse-cdn.com/v4/letter/n/a88e4f/32.png) [@nbonham](https://community.sonarsource.com/u/nbonham)\
**Post date:** [June 6, 2023, 7:17pm UTC](https://community.sonarsource.com/t/copying-data-between-sonarqube-environments/92097/1 "2023-06-06T19:17:40Z")

</div>

Versions:

- SonarQube Enterprise 8.9.5

Hello,

I am working on upgrading SonarQube from 8.9.5 to 9.9 LTS. I am working on setting up a test environment to stage the upgrade and am currently in the process of copying the data from our production environment to the new staging environment. The production environment is an azure-managed postgres database, and the test environment is a self-hosted postgres database.

I saw the SonarQube db copy tool in the docs and wasn’t sure if that tool necessarily applies to this scenario since they are both technically postegres databases. I was wondering if anyone has suggestions on how to copy the data over between environments? Thanks in advance!

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [June 7, 2023, 2:39pm UTC](https://community.sonarsource.com/t/copying-data-between-sonarqube-environments/92097/2 "2023-06-07T14:39:12Z")

</div>

Hi,

No need to use the DB copy tool. As you noted, that’s for switching DB engines.

All you have to do is back up your prod env and restore that backup in your test DB. You should be good to go from there.

&nbsp;  
HTH,  
Ann

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/system/32/31083_2.png) [@system](https://community.sonarsource.com/u/system)\
**Post date:** [June 14, 2023, 2:39pm UTC](https://community.sonarsource.com/t/copying-data-between-sonarqube-environments/92097/3 "2023-06-14T14:39:32Z")

</div>

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