Database backup and restore for OpenPages (Db2)
You must use the utilities that are provided with IBM® Db2® to back up and restore Db2 databases for OpenPages®.
For information about developing a backup and restore strategy, see the IBM DB2® documentation.
Db2 databases in OpenPages
There are two databases in IBM OpenPages that require backup:
- The OpenPages database
This database is the main application database that is created in the Db2 instance with Oracle Compatibility mode enabled.
- The Cognos® content store
This database is created in another normal Db2 instance without Oracle Compatibility mode enabled.
OpenPages Db2 database backup
For IBM OpenPages, to do a complete backup of the IBM OpenPages and the Cognos databases, you must back up each database from each of their instances. For IBM OpenPages, The simplest approach is to do an offline backup of your Db2 databases.
- Make sure that no OpenPages services are running for any long running background processes (such as object reset jobs).
- Stop the OpenPages
services.
For more information, see Starting and stopping servers.
- Open a command or shell window and connect to the Db2 database as the database instance owner.
For Windows users only, you must use the db2cmd command in the Command Prompt window to initialize the Db2 command line processor (CLP).
- Start the Db2 instance by using the db2start command.
- Do the offline backup.
For example, on a Linux® operating system, to back up a database with the alias name of
sampleto /opt/db2backup, you can usedb2 backup db sample /opt/db2backup. A backup image is created in the specified backup location in the following format:database_name.backup_type.instance_name.database_partition.catalog_partition_number.backup_date_time.time_image_sequence_number .
For example, OPX.0.DB2INST1.NODE0000.CATN0000.20251129.131259.001.
On a Microsoft Windows operating system, to back up a database with the alias name of
sampleto c:\Db2backup, you can usedb2 backup db sample c:\Db2backup. A backup image is created in the specified backup location in the following format:database_name.backup_type\instance_name\database_partition\catalog_partition_number\backup_date_time\time_image_sequence_number .
For example, OPX.0\DB2INST1\NODE0000.\CATN0000\20251129\131259.01.
For information about backing up your Db2 database, see the IBM Db2 documentation.
- Start the OpenPages services:
OpenPages Db2 database restore
You can use a Db2 database backup from your production system to restore a Db2 database to a previous state in the same environment.
Use this process as a guide for restoring a OpenPages Db2 database:
- Stop the OpenPages services:
- Open a command or shell window and connect to the Db2 database as the database instance owner.
For Windows users only, you must use the db2cmd command in the Command Prompt window to initialize the Db2 command line processor (CLP).
- Restore the Db2 database.
For example, on a Linux operating system, to restore a database with the alias name of
samplefrom the backup location /opt/db2backup with a backup timestamp of 20251129131259, you can usedb2 restore db sample from /opt/db2backup taken at 20251129131259.On a Windows operating system, to restore a database with the alias name of
samplefrom the backup location c:\Db2backup with a backup timestamp of 20251129131259, you can usedb2 restore db sample from c:\Db2backup taken at 20251129131259.For information about restoring your Db2 database, see the IBM Db2 documentation.
- Start the OpenPages services:
Moving a database when you can't use backup and restore
In some cases, it is not possible to move a Db2 database between OpenPages environments by doing a backup and restore. For example, Db2 does not support using a backup and restore to move a database if the source and target environments are using different operating systems or if the source and target are using different schema names. For more information, see Backup and restore operations between different operating systems and hardware platforms in the Db2 documentation.
Db2 has several tools and techniques that you can use instead. For more information about how to use these tools with OpenPages, see Moving Db2 database objects to a new database when a backup and restore cannot be performed.