I’m running self-hosted SonarQube 9.2 Developer.
However, since the upgrade, we’ve been having issues with Database…
Today I’ve noticed that default SonarWay profiles did completely disappear. I already tried deleting ES data and reloading, didn’t help. Is there any way of getting SonarWay profiles back into the DB?
We’re missing all profiles that were in usage (C#, JSON, CSS, TypeScript, HTML).
Even better, is there any way to completely restore data in the database? I don’t care losing the analysis history - I just want to make it working again without re-initializing the DB as I am losing my license then.
We upgraded from SonarQube Community. Originally we had v9.0.0, and we did run /setup as described in documentation and all migrations have applied. However, I think our ES was messed up, so I finally got that part working by clearing up /data/es folder.
More less things were fine until the other day - we had to reboot the server, and afterwards DB could not boot up anymore as some data was corrupted according to the logs. We managed to get it back to working state, however seems like we did loose some data during the process…
Without a backup of data from before the migration/corruption of the data, I don’t think you’ll have much luck safely bringing your server back to a consistent state (missing Quality Profiles is one thing – you don’t know what else could be in a bad state that affects future upgrades)
I would suggest starting from scratch and making sure you regularly backup your database to make sure you can recover from issues in the future. I think this is especially fine if you don’t mind losing analysis history – contact@sonarsource.com will be happy to send you a new license if necessary once you have your new Server ID.