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.
validateBackupsto 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>
configTimestampis the timestamp of a configuration backup,
solrTimestampis the timestamp of a Solr backup, and
dbTimestampis 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.
Before you restore the deployment, stop Liberty. In a deployment that contains multiple Liberty servers, you must run the
stopLibertycommand on every Liberty server.
setup -t stopLiberty
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.dirsetting 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.
setup -t restoreDatabases -p timestamp=20210420145332.
To restore the Solr search index, run the following command from a Liberty server:
setup -t restoreSolr -p timestamp=<timestamp> --hostname <liberty.hostname>
liberty.hostnameis 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.dirsetting 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.
setup -t restoreSolr -p timestamp=20210420145332 --hostname <liberty.hostname>.
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.dirsetting 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.
setup -t restoreConfiguration -p timestamp=20210420145332.
Start Liberty.In a deployment that contains multiple Liberty servers, you must run the
startLibertycommand on every Liberty server.
setup -t startLiberty
Your deployment of i2 Analyze is restored to the point in time of the backups that you specified.