Restoring File in a Cluster
In Adabas Cluster, you can restore files on the primary node of a working cluster environment with the ADABCK utility when the data was accidentally deleted and only exists on a backup file, or on another file from a different database that should also be part of the cluster environment.
Restoring files on a secondary node will be rejected with the following error message:
ADABCK-E-CLUSTER, In a cluster this operation is only allowed on the primary node
Restored backed-up data on a primary node is automatically replicated to all secondary nodes.
When a file is successfully restored in the cluster, a copy of the ADABCK dump file (BCK001) is stored in the database directory on the secondary nodes. You can specify a different directory with the environment variable ADA_CLUSTER_FILE_DIR. The dump file copies on the secondary nodes are deleted after a successful restore.
Ensure that sufficient space is available in the database of the secondary nodes or the custom directory with the nucleus parameter OPTIONS=AUTO_EXPAND.
The following example shows how to restore data in a cluster with three nodes:
1. Display cluster status.
# Display cluster status:
bash-4.4$ adaopr dbid=10 disp=clu
%ADAOPR-I-STARTED, 15-FEB-2023 11:07:42, Version 7.1.1.2 (Linux 64Bit)
Database 10, startup at 15-FEB-2023 11:04:31
ADANUC Version 7.1.1.2, PID 3507248
ADANUC Version 7.1.1.2
Database 10 Cluster on 15-FEB-2023 11:07:42
Cluster UUID 23d93497-ad18-11ed-82a0-03306cce0c8c
view was last updated at sequence number 4
cluster node is at sequence number 6
3 Node(s) Primary component of the cluster
NAME ADATCP STATUS
---- ------ ------
redada01-55010 adatcp://redada01:56010 SYNCED
redada02-55011 adatcp://redada02:56011 SYNCED
redada03-55012 adatcp://redada03:56012 SYNCED
Primary node: redada4c-55010
Current node: redada4c-55010
%ADAOPR-I-TERMINATED, 15-FEB-2023 11:07:42, elapsed time: 00:00:00
2. Check if file already exists.
# Check if file already exists:
bash-4.4$ adarep dbid=10 file=10
%ADAREP-I-STARTED, 15-FEB-2023 11:08:02, Version 7.1.1.2 (Linux 64Bit)
%ADAREP-I-DBON, database 10 accessed online
FILE=10
^
%ADAREP-E-NOFIAV, No files available
%ADAREP-I-ABORTED, 15-FEB-2023 11:08:02, elapsed time: 00:00:00
3. Restore file 10 and 11.
# Restore file 10 and 11:
bash-4.4$ adabck dbid=10 restore=10-11
%ADABCK-I-STARTED, 15-FEB-2023 11:08:42, Version 7.1.1.2 (Linux 64Bit)
%ADABCK-I-DBON, database 10 accessed online
Restore files dumped on 15-FEB-2023 11:06:56
Database 10, GENERAL_DATABASE
File 10, MULTI-UPD0 , loaded on 15-FEB-2023 11:04:09
File 11, EMPLOYEES-NAT , loaded on 15-JUL-2014 17:46:10
%ADABCK-I-IOCNT, 5 IOs on dataset DATA
%ADABCK-I-IOCNT, 42 IOs on dataset ASSO
%ADABCK-I-IOCNT, 11 IOs on dataset BCK001
%ADABCK-I-TERMINATED, 15-FEB-2023 11:08:42, elapsed time: 00:00:00
4. Display metadata of restored file 10 on primary node.
# Display metadata of restored file 10 on primary node:
bash-4.4$ adarep dbid=10 file=10
%ADAREP-I-STARTED, 15-FEB-2023 11:08:51, Version 7.1.1.2 (Linux 64Bit)
%ADAREP-I-DBON, database 10 accessed online
Database 10, File 10 (MULTI-UPD0 ) 15-FEB-2023 11:08:51
Highest Index Level: 3 Padding Factors: ASSO 5%, DATA 5%
Top ISN: 2,760 Maximum ISN expected: 8,191
Records loaded: 2,760
Last FDT Modification: 15-FEB-2023 11:04:09.267705
Last ADABCK dump: 15-FEB-2023 11:04:50
ISN reusage: Enabled, inactive Space reusage: Enabled
Program refresh: Disabled Ciphering: Disabled
Recordspanning: Disabled
Container Block Extent Extents in Blocks Allocated Unused
File Size Type from to Blocks MB Blocks MB
-------------------------------------------------------------------------------
ASSO:
2 32KB AC 7,704 7,704 1 0 0 0
1 8KB NI 400 439 40 0 32 0
1 8KB UI 440 459 20 0 15 0
DATA:
1 32KB DS 309 333 25 0 23 0
-------------------------------------------------------------------------------
%ADAREP-I-TERMINATED, 15-FEB-2023 11:08:51, elapsed time: 00:00:00
5. Display metadata of restored file 10 on one of the secondary nodes.
# Display metadata of restored file 10 on one of the secondary nodes:
bash-4.4$ adarep dbid=12 file=10
%ADAREP-I-STARTED, 15-FEB-2023 11:08:56, Version 7.1.1.2 (Linux 64Bit)
%ADAREP-I-DBON, database 12 accessed online
Database 12, File 10 (MULTI-UPD0 ) 15-FEB-2023 11:08:56
Highest Index Level: 3 Padding Factors: ASSO 5%, DATA 5%
Top ISN: 2,760 Maximum ISN expected: 8,191
Records loaded: 2,760
Last FDT Modification: 15-FEB-2023 11:04:09.267705
Last ADABCK dump: 15-FEB-2023 11:04:50
ISN reusage: Enabled, inactive Space reusage: Enabled
Program refresh: Disabled Ciphering: Disabled
Recordspanning: Disabled
Container Block Extent Extents in Blocks Allocated Unused
File Size Type from to Blocks MB Blocks MB
-------------------------------------------------------------------------------
ASSO:
2 32KB AC 7,704 7,704 1 0 0 0
1 8KB NI 400 439 40 0 32 0
1 8KB UI 440 459 20 0 15 0
DATA:
1 32KB DS 309 333 25 0 23 0
-------------------------------------------------------------------------------
%ADAREP-I-TERMINATED, 15-FEB-2023 11:08:56, elapsed time: 00:00:00