Backup and restore of a big PostgreSQL instance

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
  • how is SonarQube deployed: zip, Docker, Helm
  • what are you trying to achieve
  • what have you tried so far to achieve this

Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!

Hi, I’m running SonarQube community edition on kubernetes on-premise. I would like to migrate this instance to the cloud (AWS, specifically) while upgrading to the latest version.
Currently, we are running

SonarQube ID information
Version: 9.5.0.56709
Date: 2024-06-28

with a separate pod running PostgreSQL. Currently, the DB weighs around 380GB. I would like to understand if we really need all that data (the installation is 3,5 years old and there are some huge tables, like live_measures, that are up to 220GB of data) to be backed up and restored to the new instance or if we can drop older data without corrupting the DB.

Hey there.

You cannot drop older data manually, although feel free to do some cleanup on your SonarQube server (deleting old projects) before making the migration. You can find some tips for handling inactive projects here.