Recovering from a disaster

You can use the backups of the components of i2 Analyze to restore the system, or parts of a the system, after a disaster. In a production deployment of i2 Analyze, use a tested backup and restore procedure to ensure that you can recover from failures.

About this task

The following steps describe the process of restoring a deployment of i2 Analyze by using the provided toolkit tasks. You do not need to restore every component by using the toolkit tasks. For example, you can use existing processes to restore the database and use the toolkit task to restore Solr. Regardless of the mechanism that you use to restore the components, you must restore the components in the same order as the following steps.

For more information about the restore toolkit tasks, see:

In a deployment that contains the i2 Connect gateway only, you only need to restore the i2 Analyze and Liberty configuration.

To recover from a disaster, you might need to reinstall the i2 Analyze deployment toolkit and install the components of i2 Analyze on the failed servers. The following process assumes that you are recreating the servers for each component in your deployment.

Procedure

  1. Create the environment to restore your deployment in to. If your servers were lost due to a disaster, you might need to recreate them with the required prerequisites. For more information about the servers that are used in a deployment of i2 Analyze, see Deployment topologies.

  2. Use the validateBackups to ensure that the timestamps of the backups you are restoring are compatible.
    This task compares the timestamps of the backups created by the toolkit to ensure that the configuration backup is the earliest, and that the Solr backup precedes the database backup.

    setup -t validateBackups -p configTimestamp=<timestamp> -p solrTimestamp=<timestamp> -p dbTimestamp=<timestamp>

    Where configTimestamp is the timestamp of a configuration backup, solrTimestamp is the timestamp of a Solr backup, and dbTimestamp is the timestamp of a database backup. You do not have to provide all of the timestamps to run the toolkit task.

    If the backups are compatible, continue with the restore process.

  3. Restoring to new Liberty servers.

    1. Copy the i2a-config-<timestamp>\toolkit-config directory from your backup to the toolkit\configuration directory of the deployment toolkit on each server in your environment.

      You might have a different configuration backup for each Liberty server in your deployment, ensure that you copy the correct backup for each Liberty server.

  4. Create a new deployment to restore into. To create a new deployment, follow the instructions to install, deploy, and start the components in Deploying i2 Analyze on multiple servers.

    By starting the components, you ensure that your environment is deployed successfully. You can now restore your environment from your backups.

  5. Before you restore the deployment, stop Liberty. In a deployment that contains multiple Liberty servers, you must run the stopLiberty command on every Liberty server.

    setup -t stopLiberty
  6. To restore the database in your deployment, run the following command from a Liberty server:

    setup -t restoreDatabases -p timestamp=<timestamp>

    The database backup is identified in the location from the backup.db.location.dir setting by using the timestamp that was specified in the command. The timestamp value in the command must match the timestamp of a backup in the location.

    For example: setup -t restoreDatabases -p timestamp=20210420145332.

  7. To restore the Solr search index, run the following command from a Liberty server:

    setup -t restoreSolr -p timestamp=<timestamp> --hostname <liberty.hostname>

    Where liberty.hostname is the hostname of the Liberty server where you are running the command, and matches the value for the host-name attribute of the <application> element in the topology.xml file.

    The Solr backup is identified in the location from the backup.solr.location.dir setting by using the timestamp that was specified in the command. The timestamp value in the command must match the timestamp of a backup directory in the location.

    For example: setup -t restoreSolr -p timestamp=20210420145332 --hostname <liberty.hostname> .

  8. Deploying to new Liberty servers.

    1. To restore the i2 Analyze and Liberty configuration, run the following command from a Liberty server:

      setup -t restoreConfiguration -p timestamp=<timestamp>
      • The configuration backup is identified in the location from the backup.config.location.dir setting by using the timestamp that was specified in the command.

      • The timestamp value in the command must match the timestamp of a backup directory in the location.

      • In a deployment that contains multiple Liberty servers, run the restoreConfiguration command on each Liberty server.

      For example: setup -t restoreConfiguration -p timestamp=20210420145332.

    2. Start Liberty.
      In a deployment that contains multiple Liberty servers, you must run the startLiberty command on each Liberty server.

      setup -t startLiberty

Result

Your deployment of i2 Analyze is restored to new servers after a disaster.