Restoring a deployment to a point in time

Use the backups of the components of i2 Analyze to restore the system to a previous point in time. 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 database before you restore the Solr index.

To deploy to a previous point in time, your deployment must be functional. The procedure assumes that Solr, ZooKeeper, and the database management system are running. As part of the process, you must stop the Liberty servers in the deployment. To recover a deployment after a disaster, see Recovering from a disaster.

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

For more information about the restore toolkit tasks, see:

Run each toolkit command from a Liberty server in your deployment.

Procedure

  1. 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.

  2. 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
  3. 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.

  4. 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>.

  5. 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 with high availability, run this command on each Liberty server.

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

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

    setup -t startLiberty

Result

Your deployment of i2 Analyze is restored to the point in time of the backups that you specified.