Enterprise Sonarqube DB export from existing instance to new instance

Hello

we are running Enterprise sonarqube 9.9 LTS version with Postgres database we were setting up another sonarqube instance and wanted to export data from running sonarqube to new sonarqube.
we tried exporting db dump from existing SQ to new SQ with pg_restore and got following errors. Can someone please advise if there are different methods to export the data and if anyone had got the below error messages while running pg_restore command.

It throws errors stating - table/index already exists or user does not have privilege

Hi,

There’s no need to export/import. Simply point the new SonarQube version at your existing database and spin it up (after shutting down the old instance, of course).

The docs should help.

 
Ann

Thank you Ann for the response.

The two SQ instances are in two different aws accounts and we don’t want to use the old postgres db once export is done to new aws account, we want to decomission. So in the new aws account we will have new SQ and new postgres DB and this db should get the data from the old DB mentioned earlier

Hi,

Okay, then this is purely a DBA question of getting the DB moved over properly.

Once you’ve got your backup restored in the new server, I advise pointing a 9.9 instance at it first, just to make sure it comes up properly. Then proceed with the upgrade.

 
HTH,
Ann

Thank you for response