1
我想用原始服务器中的所有项目和设置重建Sonarqube服务器。数据库是Postgresql。但是我找不到这样的一些文档。如何备份和恢复Postgresql中的Sonarqube数据库
首先,我尝试在Sonarqube的Web UI中进行备份:设置 - >系统 - >备份,然后将其备份到xml文件中。但是当我在一个新的Sonarqube服务器中恢复它时,原始服务器中的所有项目都消失了。看起来这个“备份”仅用于设置,不包括项目数据。
然后我试着备份数据库。在构建我创建了一个数据库 “声纳” 的来历Sonarqube服务器:
postgres-# create database sonar with owner sonar encoding 'UTF8';
于是,我就放弃它:
$ sudo su - postgres
$ pg_dump sonar
pg_dump: [archiver (db)] connection to database "sonar" failed: FATAL: database "sonar" does not exist
尝试验证它的存在:
$ psql -l
但是只有三个项目:postgres,template0和template1。 “声纳”数据库在哪里?我也试图与用户查询“声纳”,但失败:
$ psql -l -U sonar
psql: FATAL: Peer authentication failed for user "sonar"
因此,如何与所有的老项目和设置重建Sonarqube服务器?