Incremental Data Recovery in a Cluster with Three Nodes
The following in an example of incremental data recovery in a cluster with three nodes.
1. Start a cluster with three nodes that use the Adabas data protection log (PLOG).
ADADATADIR/db001:
...
-rw-rw-r-- 1 sag adabas 104857600 Sep 19 10:42 DATA1.001
-rw-rw-r-- 1 sag adabas 4086 Sep 19 10:42 DB001.INI
-rw-rw-r-- 1 sag adabas 1948 Sep 19 10:42 NUCPLG.0002
...
ADADATADIR/db002:
...
-rw-rw-r-- 1 sag adabas 104857600 Sep 19 10:42 DATA1.002
-rw-rw-r-- 1 sag adabas 4123 Sep 19 10:42 DB002.INI
-rw-rw-r-- 1 sag adabas 1064 Sep 19 10:42 NUCPLG.0003
...
ADADATADIR/db003:
...
-rw-rw-r-- 1 sag adabas 104857600 Sep 19 10:42 DATA1.003
-rw-rw-r-- 1 sag adabas 4123 Sep 19 10:42 DB003.INI
-rw-rw-r-- 1 sag adabas 420 Sep 19 10:42 NUCPLG.0004
...
bash-5.1$ adaopr dbid=1 display=cluster
...
ADANUC Version 7.3.0.0
Database 1 Cluster on 19-SEP-2024 10:58:09
Cluster UUID 28d307f4-7665-11ef-8b9d-3371d1b6c375
view was last updated at sequence number 4
cluster node is at sequence number 4
3 Node(s) Primary component of the cluster
NAME ADATCP STATUS
---- ------ ------
NODE-1 adatcp://redada6c.eur.ad.sag:56001 SYNCED
NODE-2 adatcp://redada6c.eur.ad.sag:56002 SYNCED
NODE-3 adatcp://redada6c.eur.ad.sag:56003 SYNCED
Primary node: NODE-1
Current node: NODE-1 Cluster_Log_Level: DEBUG
...
2. Execute a large number of update commands and simultaneously execute adabck dump=* on the primary node.
...
bash-5.1$ adabck dbid=1 dump=*
...
cluster node is at sequence number 53
...
NUCPLG.0003 created on node-1
NUCPLG.0004 created on node-2
NUCPLG.0005 created on node-3
...
3. Execute a small number of update commands, stop node-3, and rebuild it using the backup file from the primary node and the PLOG file of node-3.
...
bash-5.1$ adaopr dbid=3 shutdown
...
bash-5.1$ adabck dbid=3 restore=* new_dbid=3
...
Start database 3 with parameter ‘noplog’ and ‘options=utilities_only’
...
bash-5.1$ adarec dbid=3 regenerate=* PLOG=5
bash-5.1$ adaopr dbid=3 shutdown
...
4. Start node-3 and rejoin it to the cluster.
The latest transactions are recovered by IST.
...
bash-5.1$ adastart 3
...
bash-5.1$ adaopr dbid=3 display=cluster
...
ADANUC Version 7.3.0.0, PID 3688106
ADANUC Version 7.3.0.0
Database 3 Cluster on 19-SEP-2024 13:17:22
Cluster UUID 145795f7-766d-11ef-bc98-b74871d31199
view was last updated at sequence number 61
cluster node is at sequence number 61
3 Node(s) Primary component of the cluster
NAME ADATCP STATUS
---- ------ ------
NODE-1 adatcp://redada6c.eur.ad.sag:56001 SYNCED
NODE-2 adatcp://redada6c.eur.ad.sag:56002 SYNCED
NODE-3 adatcp://redada6c.eur.ad.sag:56003 SYNCED
Primary node: NODE-1
Current node: NODE-3 Cluster_Log_Level: DEBUG
...
5. Execute a small number of update commands, stop the primary node node-1, and rebuild it using the backup file from the primary node and the PLOG file of node-1.
...
bash-5.1$ adaopr dbid=1 shutdown
...
bash-5.1$ adabck dbid=1 restore=*
...
Start database 1 with parameter ‘noplog’ and ‘options=utilities_only’
...
bash-5.1$ adarec dbid=1 regenerate=* PLOG=3
bash-5.1$ adaopr dbid=1 shutdown
...
6. Start node-1 and rejoin it to the cluster.
The latest transactions are recovered by IST.
...
bash-5.1$ adastart 1
...
bash-5.1$ adaopr dbid=1 display=cluster
...
ADANUC Version 7.3.0.0
Database 1 Cluster on 19-SEP-2024 14:27:18
Cluster UUID 145795f7-766d-11ef-bc98-b74871d31199
view was last updated at sequence number 70
cluster node is at sequence number 70
3 Node(s) Primary component of the cluster
NAME ADATCP STATUS
---- ------ ------
NODE-2 adatcp://redada6c.eur.ad.sag:56002 SYNCED
NODE-3 adatcp://redada6c.eur.ad.sag:56003 SYNCED
NODE-1 adatcp://redada6c.eur.ad.sag:56001 SYNCED
Primary node: NODE-2
Current node: NODE-1 Cluster_Log_Level: DEBUG
...
7. Switch to node-1 as the primary node.
All nodes are in status SYNCED again.
...
bash-5.1$ adaopr dbid=2 cluster_primary=NODE-1
...
Database 2, startup at 19-SEP-2024 11:54:00
ADANUC Version 7.3.0.0, PID 3608567
Cluster UUID 145795f7-766d-11ef-bc98-b74871d31199
view was last updated at sequence number 70
cluster node is at sequence number 71
3 Node(s) Primary component of the cluster
NAME ADATCP STATUS
---- ------ ------
NODE-2 adatcp://redada6c.eur.ad.sag:56002 SYNCED
NODE-3 adatcp://redada6c.eur.ad.sag:56003 SYNCED
NODE-1 adatcp://redada6c.eur.ad.sag:56001 SYNCED
Primary node: NODE-1
Current node: NODE-2 Cluster_Log_Level: DEBUG
...