Running the BART WAL Scanner v2.6
The BART WAL scanner is used to process each WAL file to find and record modified blocks in a corresponding MBM file. As a BART account user, use the BART WAL scanner to invoke the bart-scanner
program located in the <BART_HOME>/bin
directory.
For detailed information about the WAL scanner and its usage, see the EDB Backup and Recovery User Guide available at the EDB website.
Syntax:
When the bart-scanner
program is invoked, it forks a separate process for each database server enabled with the allow_incremental_backups
parameter.
The WAL scanner processes can run in either the foreground or background depending upon usage of the --daemon
option:
- If the
--daemon
option is specified, the WAL scanner process runs in the background. All output messages can be viewed in the BART log file. - If the
--daemon
option is omitted, the WAL scanner process runs in the foreground. All output messages can be viewed from the terminal running the program as well as in the BART log file.
The following table describes the VERIFY-CHKSUM
options.
Options | Description |
---|---|
-h --help | Displays general syntax and information on WAL scanner usage. |
-v --version | Displays the WAL scanner version information. |
-d --debug | Displays debugging output while executing the WAL scanner with any of its options. |
-c <config_file_path> --config-path <config_file_path> | Specifies <config_file_path> as the full directory path to a BART configuration file. Use this option if you do not want to use the default BART configuration file <BART_HOME>/etc/bart.cfg |
--daemon | Runs the WAL scanner as a background process. |
-p <mbm_file_path> --print <mbm_file_path> | Specifies the full directory path to an MBM file whose content is to be printed. The archived_wals directory as specified in the the archive_path parameter in the bart.cfg file contains the MBM files. |
<wal_file_path> | Specifies the full directory path to a WAL file to be scanned. The archive path directory contains the WAL files. Use it if a WAL file in the archive path is missing its MBM file. This option is to be used for assisting the EnterpriseDB support team for debugging problems that may have been encountered. |
RELOAD | Reloads the BART configuration file. The keyword RELOAD is case-insensitive. The RELOAD option is useful if you make changes to the configuration file after the WAL scanner has been started. It will reload the configuration file and adjust the WAL scanners accordingly. For example, if a server section allowing incremental backups is removed from the BART configuration file, then the process attached to that server will stop. Similarly, if a server allowing incremental backups is added, a new WAL scanner process will be launched to scan the WAL files of that server. |
STOP | Stops the WAL scanner. The keyword STOP is not case-sensitive. |
--checksum-algorithm | While invoking the WAL scanner, you can specify one of the following values with the --checksum-algorithm option: --checksum-algorithm=MD5 (default) to generate MD5 checksum files. --checksum-algorithm=SHA256 to generate SHA256 checksum files. --checksum-algorithm=NONE to skip generating checksum files. |
Example
The following code sample demonstrates starting the WAL scanner to run interactively. The WAL scanner begins scanning existing WAL files in the archive path that have not yet been scanned (that is, there is no corresponding MBM file for the WAL file):
The following code sample is the content of the archive path showing the MBM files created for the WAL files. (The user name and group name of the files have been removed from the example to list the WAL files and MBM files in a more readable manner):
To stop the interactively running WAL scanner, either enter ctrl-C
at the terminal running the WAL scanner or invoke the bart-scanner
program from another terminal with the STOP
option:
The terminal on which the WAL scanner was running interactively appears as follows after it has been stopped:
The following code sample demonstrates invoking the WAL scanner to run as a background process with the --daemon
option:
The WAL scanner runs as a background process. There is also a separate background process for each database server that has been enabled for WAL scanning with the allow_incremental_backups
parameter in the BART configuration file:
To stop the WAL scanner processes, invoke the WAL scanner with the STOP
option:
The following command demonstrates scanning an individual WAL file:
To print the content of an MBM file for assisting the EnterpriseDB support team for debugging problems that may have been encountered, use the -p
option to specify the file as shown in the following code sample: