Backing up Klocwork data
This article describes backing up and restoring Klocwork data.
All data generated during Klocwork project builds, including the build information stored in the MariaDB database and the defect data stored in Lucene is kept in the projects_root directory, so backing up the entire directory makes sure that this information can be restored if necessary. For more information about the default location and other special considerations, see Projects_root directory.
After installation, Klocwork does not modify any files outside the projects_root directory, so in general, it is not necessary to periodically back up files outside the projects_root directory.
However, if you have:
- customized Klocwork configuration files in the <server_install>/config directory (such as kwfilter.conf and kwmysql.ini), back up this directory as well. Remember to back up these files whenever they are modified.
- created and deployed custom checkers, back up the <server_install>/plugins directory as well.
As part of an integration build analysis, Klocwork copies any necessary data from the tables directory to the projects_root, so you do not need to back up the tables directory.
Performing a backup
Restoring from a backup
- If the entire installation was corrupted and reinstalled, and if you had backed up any configuration files as part of the preparation phase, copy them back to the newly installed <server_install>/config directory.
- Stop any running Klocwork Servers. See Stopping the Klocwork Servers.
- Delete the entire content of the (corrupted) projects_root directory.
- Restore the entire projects_root from backup media to the projects_root location.
- Start the Klocwork Servers on the restored projects_root. See Starting the Klocwork Servers.