You may need to move a projects_root directory, perhaps because you need more space or need to upgrade hardware.
This procedure walks you through the simplest scenario, where:
- the existing projects_root is located on Machine A
- all of the Klocwork Servers are running on Machine A
- you will be moving your projects_root to a new host (from Machine A to Machine B)
- after the move, you will no longer use the projects_root directory on Machine A (that is, you will be using only one projects_root directory)
- after the move, you will be running all of the Klocwork Servers on Machine B
It is possible to move a projects_root directory to another platform (for example, from Linux to Windows). No special steps are required in this situation.
Important: - Because you need to shut down the servers during the move, schedule a time that will inconvenience as few users as possible, such as during regularly scheduled maintenance.
- You cannot change the physical host name of the License Server in the license file. If you need to move the License Server to another host, you must contact Klocwork for a new license file. However, you can edit the host name in the license file if the host name of the machine hosting the license manager has changed, or if you want to change how the host name is defined (for example, from a simple to a fully qualified host name).
To move a projects_root directory to another path:
- Machine B: Install the Klocwork Server package.
- Machine A: Stop the servers for the existing projects_root. We will call this projects_root_A. For example:
-
kwservice --projects-root <projects_root_A> stop
- Copy the entire projects_root_A directory to Machine B.
- If you had customized configuration files in <Server_install>/config, copy them to the same location in the Klocwork Server installation on Machine B. For example:
- kwmysql.ini
- kwfilter.conf
- If you customized the <Server_install>/webapps/review/WEB-INF/web.xml file, copy it to the same location in the Klocwork Server installation on Machine B.
- Machine B: In the copied projects_root, change the host name for the Klocwork servers to the new host name.
- For example:
-
kwservice --projects-root <projects_root_B> set-service-property license host MachineB
-
kwservice --projects-root <projects_root_B> set-service-property database host MachineB
-
kwservice --projects-root <projects_root_B> set-service-property klocwork host MachineB
- Machine B: Start the servers in the new projects_root. For example:
-
kwservice --projects-root <projects_root_B> start
-
Machine A: Delete the old versions of any projects you have moved, so that people cannot continue to use them. If you no longer need the old Klocwork installation, uninstall Klocwork.
- Make any required script changes to reflect the new projects_root.
- Update the project's synchronization values by removing the old host and adding the new one.
- For example:
-
kwmatch --dbhost <old_server_machineA> remove --projects-root <projects_root_B>
-
kwmatch --dbhost <new_server_machineB> add --projects-root <projects_root_B>
- Inform users of the new host name for the Klocwork Server and License Server and specify, if necessary, which projects were moved.
- For Windows, see also Special steps for Windows.