Hi,
I’m maintaining a sonarqube server currently running version 9.9.2 inside a docker container.
We have a regular backup job scheduled that stops the server, then backs up the postgresql database and then starts the server again. Due to the sonarqube restart, all the users sessions get closed and people need to login again which is a little inconvenient.
So I was wondering whether it’s safe to start the postgresql dump while the server is running, potentially with some analysis going on? Don’t want to risk to create an inconsistent database dump.
It’s safest to take a backup while SonarQube isn’t running. You do risk data inconsistencies otherwise.
If you take the backup with an analysis report is being processed, you could capture your snapshot while a project is “mid-stream” with some parts updated from the latest analysis & others not.
Now, you might be able to take your backup when there are no reports being processed. That significantly lessens the potential for inconsistencies, but there’s still a chance.
Let’s say my project is failing its Quality Gate because of an issue. Through the UI, I mark it false positive. What happens next is that a background process is triggered that updates
I’m the one who wrote that announcement, but SonarQube 8.9 was so long ago!
With your prompting, I did some digging in Jira. I’m not finding anything specific there about what the backup procedure should be, so it looks like this should just work.