Start here

Home
About Klocwork
What's new
Fixed issues
Release notes
Installation

Reference

C/C++ checkers
Java checkers
C# checkers
MISRA C 2004 checkers
MISRA C++ 2008 checkers
MISRA C 2012 checkers
MISRA C 2012 checkers with Amendment 1
Commands
Metrics
Troubleshooting
Reference

Product components

C/C++ Integration build analysis
Java Integration build analysis
Desktop analysis
Refactoring
Klocwork Static Code Analysis
Klocwork Code Review
Structure101
Tuning
Custom checkers

Coding environments

Visual Studio
Eclipse for C/C++
Eclipse for Java
IntelliJ IDEA
Other

Administration

Project configuration
Build configuration
Administration
Analysis performance
Server performance
Security/permissions
Licensing
Klocwork Static Code Analysis Web API
Klocwork Code Review Web API

Community

View help online
Visit RogueWave.com
Klocwork Support
Rogue Wave Videos

Legal

Legal information

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 MySQL 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

Note: You need to back up any customized Klocwork configuration files from <server_install>/config separately.
To perform a backup:
  1. Stop the Klocwork Servers. See Stopping the Klocwork Servers.
  2. Use normal operating system (or backup utility) commands to copy the entire projects_root directory to your desired backup media.
  3. Start the Klocwork Servers. See Starting the Klocwork Servers.

Restoring from a backup

Note: Because you are restoring data from the last time you performed a backup, you will lose all analyses and transactions performed since the backup. There is no way to automatically reapply transactions to the last backup.
To restore from a backup:
  1. 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.
  2. Stop any running Klocwork Servers. See Stopping the Klocwork Servers.
  3. Delete the entire content of the (corrupted) projects_root directory.
  4. Restore the entire projects_root from backup media to the projects_root location.
  5. Start the Klocwork Servers on the restored projects_root. See Starting the Klocwork Servers.