How to change data folder in sonarqube?

2019-08-09 19:59发布

问题:

How to change data folder in sonarqube? I need to change the installation data folder to other location, is it possible? Who is the responsible of write & change this folder? Is the wrapper? I can change de location of h2 database but not the data folder location. I use Sonarqube 5.0

回答1:

See in your sonar.properties:

# Paths to persistent data files (embedded database and search index) and temporary files.
# Can be absolute or relative to installation directory.
# Defaults are respectively <installation home>/data and <installation home>/temp
#sonar.path.data=data
#sonar.path.temp=temp

You can uncomment the line sonar.path.data and set the value as needed.



回答2:

I guess that you'll have to follow the update instructions from sonarqube, as if you were to update sonarqueb to other folder/version, and remove the steps involved in the update.

http://docs.sonarqube.org/display/SONAR/Upgrading

I would try this:

  1. Stop the SonarQube server
  2. Move the sonar old folder to your new folder, let's say NEW_SONARQUBE_HOME.
  3. Back up your database, just in case.
  4. Start the web server inside your new_Sonarquebe_home