Search code examples
sonarqubesonarqube-web

Restoring builtin profile does not work


I'm working with SonarQube 5.5. I'm trying to restore the factory configuration of the Java "Sonar way" profile in SonarQube (after playing a bit with the configuration, I'd like to reset my changes). I'm using the button in Quality Profile -> Restore base profile -> Java.

The GUI tells me it has been successfully restored, but when I look at which rules are enabled, I see only 88 rules. A fresh install from SonarQube gives me 254 activated rules (see the screenshot #1).

Fresh install vs migrating and reseting

There is nothing in the logs which would indicate something went wrong.

PS: I was upgrading from SonarQube 5.4, following the official guide (run in standard db, install the plugins you need, then switch to the old db, run setup, wait, then enjoy).

Any idea?


Solution

  • Deleting the content of the ${sonarhome}/data/es, then restarting, and retrying the restore led to success. I guess my elastic search index got somehow corrupted.