DB Housekeeping

Hi all,

We are having about 1050 projects in our SonarQube 6 community edition instance and a DB size of 33 GB. Previously we had around 2000+ projects. Unfortunately we did not check the DB size before deleting all those projects. We then also lowered some of the db cleaner settings.

I am not sure if 33 GB is a lot, but I’d like to reduce the size as much as possible for a pending DB migration.

My questions are as follows:

  1. As far as I understood the automatic DB cleaner is only triggered after a project was analyzed. Does the user need admin permissions to trigger the cleanup?
  2. If I manually delete projects via administration - manage projects - bulk delete, does this automatically mean that I also delete rows in the DB?
  3. Can I manually trigger any cleanup jobs?
  4. Do I have any other means to identify orphaned entries?

Hope you guys can help me

thanks

Hi,

If the “DB migration” you’re referring to is a SonarQube upgrade, there’s no need to clean out projects; the upgrade migration should be uneventful whether you have 2 projects or 200k.

The user needs analysis permissions. Since cleanup happens as part of analysis, no special permissions are required for that specific part.

Yes.

Only by running an analysis.

I’m not sure what you mean by “orphaned”. This ticket does describe a case where rows that should be deleted aren’t, but that’s not in a project deletion context: [SONAR-7486] - Jira.

 
HTH,
Ann

1 Like

thank you for your replies, now its clear to me what happens.

1 Like