Backing-up cluster configuration information
You can save a valid configuration for a Pacemaker-managed cluster to a backup file by using the Db2 Cluster Manager (db2cm) utility.
Before you begin
Important: In
Db2®
11.5.8 and later, Mutual Failover high
availability is supported when using Pacemaker as the
integrated cluster manager. In Db2
11.5.6 and later, the Pacemaker cluster manager
for automated fail-over to HADR standby databases is packaged and installed with Db2. In Db2
11.5.5, Pacemaker is included and
available for production environments. In Db2
11.5.4, Pacemaker is included as
a technology preview only, for development, test, and proof-of-concept environments.
About this task
The backup file can be used with the -import option to quickly redeploy the
cluster onto the same hardware.
Note: The resulting backup configuration cannot be deployed on a new
set of hosts where any of the following details are different from the original cluster:
- Hostnames
- Domain name
- Interface names
- Instance names
- Database names
- Primary/Standby virtual IP addresses
- Qdevice host
Procedure
Example
The following example shows the command syntax and output from verifying that the hosts and
cluster are online:
./sqllib/bin/crm status
Cluster Status
Domain information:
Domain name = pcmkdomain
Pacemaker version = 2.0.2-1.db2pcmk.el8
Corosync version = 3.0.3
Current domain leader = jesting1
Number of nodes = 2
Number of resources = 6
Node information:
Name name State
---------------- --------
jesting1 Online
inwards1 Online
Resource Information:
Resource Name = db2_db2inst1_db2inst1_HADRDB
Resource Type = HADR
DB Name = HADRDB
Managed = true
HADR Primary Instance = db2inst1
HADR Primary Node = jesting1
HADR Primary State = Online
HADR Standby Instance = db2inst1
HADR Standby Node = inwards1
HADR Standby State = Online
Resource Name = db2_inwards1_db2inst1_0
State = Online
Managed = true
Resource Type = Instance
Node = inwards1
Instance Name = db2inst1
Resource Name = db2_inwards1_eth1
State = Online
Managed = true
Resource Type = Network Interface
Node = inwards1
Interface Name = eth1
Resource Name = db2_jesting1_db2inst1_0
State = Online
Managed = true
Resource Type = Instance
Node = jesting1
Instance Name = db2inst1
Resource Name = db2_jesting1_eth1
State = Online
Managed = true
Resource Type = Network Interface
Node = jesting1
Interface Name = eth1
Fencing Information:
Not Configured
Quorum Information:
Qdevice
Qdevice information
-------------------
Model: Net
Node ID: 1
Configured node list:
0 Node ID = 1
1 Node ID = 2
Membership node list: 1, 2
Qdevice-net information
----------------------
Cluster name: pcmkdomain
QNetd host: frizzly1:5403
Algorithm: LMS
Tie-breaker: Node with lowest node ID
State: Connected
The following example shows the command syntax and output from backing up a cluster
configuration:
[root@jesting1]$ /home/<instance user>/sqllib/bin/db2cm -export /tmp/backup.conf
Exporting cluster configuration to /tmp/backup.conf...
Export completed successfully.
[root@jesting1]$ ls -la /tmp/backup.conf
-rw-r--r-- 1 root root 12888 Sep 1 14:22 /tmp/backup.conf