Restore you database without having to create a new database or instance

Govindasamy, Careen 0 Reputation points
2023-06-08T15:27:47.47+00:00

Hi,

We are upgrading our SonarQube version. We have our plugin licenses attached to the instance (server) . We need to restore the database without having to create a new server or new database. If we create a new database or server , we would lose pur licenses and also our Power BI reports.

We would like to know how it would it would be possible to do the bacup restore in the same database?

Regards

Azure Database for PostgreSQL
{count} votes

1 answer

Sort by: Most helpful
  1. Sedat SALMAN 14,180 Reputation points MVP
    2023-06-08T17:21:16.12+00:00

    You can directly restore your database over an existing database (you do not need to create another server or database)

    The pg_restore command will overwrite data in your database. Make sure you have a backup before running this command.

    pg_restore -U [username] -h [hostname] -d [dbname] -1 [backup_file]
    

    But as a note:

    if you restore the database you overrode the database this means that you lose all the difference between the backup and your existing DB

    If your plugin licenses information also exists in the backup there will be no problem

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.