Restoring project and server information using validate_restore

A backup created with one version of validate_backup cannot be restored with a different version of validate_restore. For example, a backup created with Validate 24.4 cannot be restored using Validate 24.3 or 25.1. Use the same version of Validate to back up and restore a project or server. To avoid compatibility issues when you migrate to a new server version, we recommend that you create new project and server backups after you finish the migration.

You can use validate_restore in your Validate server installation's bin directory to restore both project and server information.

The parameters are shown in the table below.

Options

Name Description
--db-host Override the database server host name. The specified value will not be written to the target projects root; use when DNS resolution fails. (default: None)
--db-password

Specify the database server password (default: <Empty>)

--db-port Override the database server port. The value specified will not be written to the target projects root; use if the configured port is different than the external port. (default: None)
--db-user Specify the database server user (default: kw)
--help, -h Show this help message and exit
--log-level Log level to filter the type and severity of logged events. Accepted values: DEBUG, INFO, WARNING, ERROR, CRITICAL. (default: INFO)
--restore-server-configuration (Step 1 of restoring a server) Copy projects root configuration files to the target projects root. The servers for the target projects root must be stopped. (default: False)
--restore-server-settings

(Step 2 of restoring a server) Restore server settings to the target projects root. Prerequisites: must be run after --restore-server-configuration, and the servers for the target projects root must be started. See the documentation for details. (default: False)

--source

Specify the path to the Validate server or project backup to restore from (default: None)

--ssl Specify if the target server has SSL enabled. The specified value will not be written to the target projects root. (default: False)
--target Specify the path to the target projects root archive to restore the backup to (default: None)
--validate-installation

Specify the path to the Validate installation directory, for example: C:\Perforce\Validate_24.4 (default: None)

--verbose

Enable verbose logging for some internal backup commands (default: False)

--web-host Override the Validate server host name. The value specified will not be written to the target projects root; use when DNS resolution fails. (default: None)
--web-port Override the Validate server port. The value specified will not be written to the target projects root; use if the configured port is different than the external port. (default: None)

Restoring a project's information

You can restore a project backup that was created using validate_backup to a Validate server.

Prerequisites:

  • The server where you will restore the project is running
  • The project does not exist on the server

You must specify the following parameters:

  • --source (The path to the Validate server or project backup to restore from)
  • --target (The path to the target projects root archive to restore the backup to)
  • --validate-installation (The path to the Validate installation directory)

To restore a project's information

Run the following command:

<validate installation>/bin/validate_restore(.cmd) --target <projects root path> --validate-installation <validate installation path> --source <source backup (archive) path>

Restoring a server's information

To restore a backup of your Validate server's non-project configuration and information, follow the steps below.

A server backup cannot be restored to the same server or an existing server. You must restore server information to a new projects root.

To restore a server's information

  1. To create a new projects root (where you will restore the backup), run the following command: 
    kwservice -r <projects root> setup --restore
  2. Do not start the new projects root, or configure any additional information for it aside from host and port information.
  3. (Optional) Configure the new projects root with host and port information for web, database, and license host services. For example:
    kwservice -r <projects root> set-service-property web port 8082
  4. To restore the server configuration from the backup, run the following command:
    <validate installation>/python validate_restore(.cmd) <optional parameters> --restore-server-configuration
  5. If your IdP redirects URLs to the new server, confirm that the URLS are still valid.
  6. If the server that you are restoring is SAML or OIDC authenticated with SSL enabled, see Restoring SAML or OIDC authenticated servers with SSL and follow the instructions that apply to you.
  7. To start the projects root, run the following command:
    kwservice <optional parameters> start
  8. To restore the remaining server information, run the following command:
    <validate installation>/python validate_restore(.cmd) <optional parameters> --restore-server-settings

A copy of your server information is now restored. To restore projects to this server, see Restoring a project's information.