2.29 pdfbkup (Back up HiRDB file system)
(1) Function
The pdfbkup command makes a backup in a regular file of the HiRDB file system. Backups can also be made in units of HiRDB files.
During the backup processing, this command also backs up the attributes of the HiRDB file system (specified by the pdfmkfs command). Although the attributes are inherited, once a HiRDB file system is expanded, the pdfrstr command cannot restore the original size from a backup that was made before the expansion.
The number of added areas and the number of noncontiguous free areas can be determined by displaying the status of a HiRDB file system area (by entering the pdfstatfs command). The added areas and noncontiguous free areas can then be merged and the HiRDB file system area used more effectively by taking the following measures:
- Back up the HiRDB file system (pdfbkup command)
- Initialize the HiRDB file system area (pdfmkfs command)
- Restore the backed up HiRDB file system to the initialized HiRDB file system (pdfrstr command)
You will usually execute this command while HiRDB is stopped. Before you execute the command while HiRDB is running, see Backup acquisition using backup-hold (backup without using the pdcopy command) in the HiRDB Version 9 System Operation Guide. In the case of a HiRDB file system area that contains an RDAREA for which the SCHEDULE attribute is not defined, you must specify the -f option to perform forced backup processing because HiRDB files might be opened, for example, by HiRDB resident processes.
(2) Executor
(3) Format
pdfbkup [-y] [-r] [-i] [-{c|l|f}]
HiRDB-file-system-area-name[/HiRDB-filename]
backup-filename |
(4) Options
(a) -y
Specifies that the HiRDB file system is to be backed up without obtaining user confirmation. When this option is omitted, the backup is made only after the user confirms the processing.
(b) -r
Specifies that if a file with the specified backup file name already exists, it is to be deleted and re-created. When this option is omitted, an error occurs if a file with the specified backup file name already exists.
(c) -i
Specifies that if an error occurs during backup of the HiRDB file system, the backup of the file where the error occurred is to be abandoned and processing is to continue with the next file. When this option is omitted, the command terminates with an error when an error occurs.
(d) -{c|l|f}
Specifies the processing to be performed if another process or user is accessing the specified HiRDB file system area. Note that files cannot be backed up by the -c or -l option if the write privilege is not in effect for the source HiRDB file system area. When this is the case, specify the -f option.
- -c
- Cancel backup processing if another process or user is accessing the specified HiRDB file system area
- -l
- Do not make a backup of any HiRDB file currently being accessed by another process or user
- -f
- Execute backup processing even if another process or user is accessing the specified HiRDB file system area (files are backed up even when the write privilege is not in effect for the target HiRDB file system area)
(5) Command arguments
(a) HiRDB-file-system-area-name[/HiRDB-filename]
Specifies the name of the character special file or regular file that contains the HiRDB file system to be backed up and (optionally) the name of a HiRDB file.
- HiRDB-file-system-area-name ~<pathname> ((up to 165 characters))
- Specifies the name of the HiRDB file system area.
- HiRDB-filename ~<HiRDB filename>
- Specifies the name of a HiRDB file.
(b) backup-filename
Specifies the name of the regular file in which the backup is to be made.
(6) Rules
- The pdfbkup command can be executed at any time, whether or not HiRDB is active. If you execute the command during operation, specify the -f option.
- The pdfbkup command must be executed at each server machine where the HiRDB file system area is stored.
- Only one HiRDB file system can be backed up into one regular file. Therefore, a commensurate number of regular files are needed in order to back up multiple HiRDB file systems.
- The backup file is not created if an error occurs during backup processing.
- A confirmation message is displayed when the -y option is omitted. The HiRDB file system is not backed up if any character other than G is entered in response to the confirmation message.
- Before backing up a HiRDB file, use the pdfls command to check its record length. You cannot restore a HiRDB file if the record length of the backup HiRDB file is not a multiple of the sector length of the target HiRDB file system area.
- If you are executing the command on a HiRDB file system area that is used for shared RDAREAs, execute it from the server machine where the updatable back-end server is located.
(7) Notes
- The execution results of the pdfbkup command can be confirmed by the return code after the command has executed and by whether or not there are any error messages. Return code 0 for this command indicates normal termination, 1 indicates warning termination, and -1 indicates abnormal termination.
- If the pdfbkup command terminates abnormally, the backup file may have been created but its contents may not be valid.
- If the HiRDB file system area or HiRDB file to be backed up is larger than 2GB, the target file must be created in a file system that can handle large files.