16.8.1 Backup acquisition method
The following figure shows the general procedure for backing up a database.
The following subsections explain these steps in detail.
- Organization of this subsection
(1) Check notes related to making a backup
Check the notes related to making a backup with reference to 10.3.1 Backup acquisition method.
(2) Terminate the HADB servers in the multi-node configuration normally, or change the HADB server on the master node to the quiescence mode
Perform either of the following operations:
-
Execute the adbstop command and HA Monitor's monend command to terminate the HADB servers in the multi-node configuration normally.
-
Execute the adbchgsrvmode command on the master node to change the HADB server on the master node to the quiescence mode.
If you do not perform either of the above operations, database consistency cannot be achieved when the database is restored from a backup.
To check the status of an HADB server, execute the adbls command on the desired node.
(3) Back up files on the master node
The table below lists the files that need to be backed up on the master node.
If the file to be backed up is a symbolic link file, you need a copy of the linked file or block special file.
If the HADB servers in a multi-node configuration are normally terminated, make sure that the system directory is mounted to $DBDIR/ADBSYS before copying. If the directory is not mounted, execute the OS's mount command to mount the system directory to $DBDIR/ADBSYS.
Do not use the backed-up files as sparse files.
No. |
File that needs to be backed up |
File storage location |
File type |
---|---|---|---|
1 |
Command status file |
$DBDIR/ADBSYS/ADBUTL |
Regular file |
2 |
System log file |
$DBDIR/ADBSYS/ADBSLG |
Regular file |
3 |
Status file |
$DBDIR/ADBSYS/ADBSTS |
Regular file |
4 |
Master directory DB area file |
$DBDIR/ADBMST |
Block special file |
5 |
Dictionary DB area file |
$DBDIR/ADBDIC |
Block special file |
6 |
System-table DB area file |
$DBDIR/ADBSTBL |
Block special file |
7 |
All files comprising the data DB area |
$DBDIR/DBAREA#1 |
Block special file |
8 |
Archive file |
Archive directory#2 |
Regular file |
9 |
Synonym dictionary file |
Directory for storing synonym dictionary files#3 |
Regular file |
- #1
-
This is the name specified by the user in the adbinit or adbmodarea command.
- #2
-
Refers to the directory specified in ARCHIVEDIR, which is in the chunk archive specification of the CREATE TABLE statement.
- #3
-
Refers to the directory specified in the adb_syndict_storage_path operand in the server definition.
- Note
-
The following files do not need to be backed up:
-
Work table DB area file ($DBDIR/ADBWRK)
-
Files under the work directory ($DBDIR/ADBWORK)
-
Files under the output directory for error information (core files) ($DBDIR/SPOOL)
This is the directory specified in the adb_core_path operand, if that operand is specified in the server definition.
Note that there is no problem if you back up these files along with the files listed in the table above, and recover them from a backup.
-
- Note
-
There is no need to back up the audit trail files in the audit trail directory (the directory specified for the adb_audit_log_path operand in the server definition). Instead of backing up the audit trail files in the audit trail directory, you can move them to the audit trail storage directory. For details about moving audit trail files, see 12.3.1 Moving audit trail files (to audit trail storage directory).
(4) Start the HADB servers in the multi-node configuration, or change the HADB server on the master node to the normal mode
Perform either of the following operations:
-
If the adbstop command was used to terminate the HADB servers in the multi-node configuration normally before making a backup:
Execute the adbstart command and HA Monitor's monbegin command to start the HADB servers in the multi-node configuration.
-
If the adbchgsrvmode command was used to change the HADB server on the master node to the quiescence mode before making a backup:
Execute the adbchgsrvmode command on the master node to change the HADB server on the master node to the normal mode.