Setting up the HADR configuration for Db2
After you configure the service endpoints, you can quickly set up the high availability disaster recovery (HADR) configuration by running a script that performs the setup steps.
Before you begin
- Determine the HADR ports corresponding to each database.
- In a topology with a single OpenShift®
cluster, the ports for each database are:
- Primary: 60006
- Standby: 60007
- Aux1: 60008
- Aux2: 60009
- In a multiple cluster topology, use Determining the Db2 NodePorts for a multiple cluster configuration.
- In a topology with a single OpenShift®
cluster, the ports for each database are:
- If databases are in different OpenShift projects on the same cluster, also determine the IP addresses for each HADR service.
- Ensure you have the etcd endpoint (IP address/hostname and port) available for HADR setup. See
Setting up an etcd store for HADR in Db2.
For a development-only environment with all databases on a single OpenShift cluster, you can use the built-in etcd store of the primary database.
About this task
The script:
- Generates and sets the Db2 HADR database configuration parameters
- On the primary database, generates an offline backup of the database and the encryption keystore.
- On the standby databases, restores the offline backup image and encryption keystore that were copied from the primary database.
For full command syntax and parameter descriptions, see setup_config_hadr script for Db2.
To set up HADR, follow these steps: