Backing up a DPF Db2 cluster configuration to a file
You can back up the details of a Pacemaker-managed DPF Db2 cluster configuration by using the Db2 Cluster Manager (db2cm) utility.
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 resources of the cluster domain testdomain are
online:
[root@host1]# db2cm -list
HA Model: DPF Roving Standby
Domain Information:
Domain name = hadomain
Cluster Manager = Corosync
Cluster Manager Version = 3.1.7
Resource Manager = Pacemaker
Resource Manager Version = 2.1.6-4.db2pcmk.el9
Current domain leader = dpf-srv-2
Number of nodes = 4
Number of resources = 7
Host Information:
HOSTNAME STATE MAXIMUM PARTITIONS NUMBER OF PARTITIONS
------------------------ -------- ------------------------ --------------------------
dpf-srv-1 ONLINE 1 1
dpf-srv-2 ONLINE 1 1
dpf-srv-3 ONLINE 1 1
dpf-srv-4 ONLINE 1 0
Fencing Information:
Fencing Configured: Configured
Fencing Devices:
----------------
watchdog
Quorum Information:
Quorum Type: Majority
Total Votes: 4
Quorum Votes: 3
Quorum Nodes:
----------------
dpf-srv-1
dpf-srv-2
dpf-srv-3
dpf-srv-4
Resource Information:
Resource Name = db2_ethmonitor_dpf-srv-1_eth0
State = Online
Managed = True
Resource Type = Network Interface
Node = dpf-srv-1
Interface Name = eth0
Resource Name = db2_ethmonitor_dpf-srv-2_eth0
State = Online
Managed = True
Resource Type = Network Interface
Node = dpf-srv-2
Interface Name = eth0
Resource Name = db2_ethmonitor_dpf-srv-3_eth0
State = Online
Managed = True
Resource Type = Network Interface
Node = dpf-srv-3
Interface Name = eth0
Resource Name = db2_ethmonitor_dpf-srv-4_eth0
State = Online
Managed = True
Resource Type = Network Interface
Node = dpf-srv-4
Interface Name = eth0
Resource Name = db2_partition_db2inst1_0
State = Online
Managed = True
Resource Type = Partition
Instance = db2inst1
Partition Number = 0
Current Host = dpf-srv-1
Resource Name = db2_partition_db2inst1_1
State = Online
Managed = True
Resource Type = Partition
Instance = db2inst1
Partition Number = 1
Current Host = dpf-srv-2
Resource Name = db2_partition_db2inst1_2
State = Online
Managed = True
Resource Type = Partition
Instance = db2inst1
Partition Number = 2
Current Host = dpf-srv-3
The following example shows the command syntax and output from backing up a Mutual Failover Db2
cluster to the file
backup.conf.:
[root@host1]# db2cm -export /tmp/backup.conf
Cluster configuration has been exported successfully.
[root@host1]# ls -la /tmp/backup.conf
-rw-r--r-- 1 root root 12117 Nov 11 12:16 /tmp/backup.conf