Back up and restore the database
When you use the
restoreDatabases toolkit tasks to back up and restore the database in your deployment, a call to the database management system is made. The toolkit tasks create and restore a full backup of the database.
backupDatabasestoolkit task completes a full backup of the database. The application must be stopped before you can back up the database and there must be no active connections to the database.
Refer to your database management system documentation to learn how to ensure that there are no connections to your database before you create the backup.
The toolkit task is aimed for smaller deployments where the system can be offline while the database backup is completed. If you have a larger deployment or don't want the system to be offline at all, you can back up the database manually. To back up and restore the database manually refer to the documentation for your database management system:
For Db2, see Developing a backup and recovery strategy
For SQL Server, see Backup Overview
If you back up the database manually, you can still use the toolkit tasks to back up the i2 Analyze configuration and the Solr index.
When you back up a deployment of i2 Analyze, the database must be backed up after the Solr index. When you restore the database, you must restore the database before the Solr index.
environment.properties file, the
backup.db.location.dir setting is the location where the database backup are created and restored from. This location must be accessible from the database server. The user that is specified in the
credentials.properties file for your database management system must have write permissions to this location.
backupDatabasestoolkit task backs up the database to the
setup -t backupDatabases
restoreDatabasestoolkit task restores the database from a backup. You must pass the
timestampparameter to the toolkit task with a value for a backup in the
setup -t restoreDatabases -p timestamp=<timestamp>
A backup file is created in the location specified in
backup.db.location.dir. The file name includes a timestamp of when the backup is created.
On SQL Server:
You can verify the backup file was correctly created by running the following commands on your database server:
db2ckbkp <backup file>
On SQL Server:
RESTORE VERIFYONLY FROM DISK = "<backup file>"; GO