As you use Sonar more and more, it becomes the central place for code quality management. The result of every analysis goes to the database and adds to the precious history of data. You are now relying so much on Sonar that you want to protect your measures .
Since you still want to test new coding rules, different parametrization, add alerts or try a new plugin in Sonar… it is time to create a sand box to try all that. But how to then apply the changes to your production environment without having to duplicate the work already done ? Here is how to do it in 7 steps :
1. Stop the production server
2. Backup the production database
3. Copy the possible plugins from sand box onto the /extensions/plugins directory in production
4. Copy the possible custom coding rules from sand box onto the /extensions/rules directory in production
5. Re-start the production server
6. Export the sand box Sonar’s configuration. To do so, sign in on the sand box Sonar environment, go to configuration and select the Backup / Restore entry in the left menu. Click on Backup and save the file.
7. Import the configuration onto production. To do so, sign in on the production Sonar environment, go to configuration and select the Backup / Restore entry in the left menu. Click on Browse to select the backup file and press restore.
The promotion process is completed ! As this process is quite straightforward, there is no more need to play with your Sonar production environment and your historical measures are now safe.