5.5 Running the BART WAL Scanner

Table of Contents Previous Next


5 Operation : 5.5 Running the BART WAL Scanner

The BART WAL scanner is used by invoking the bart-scanner program located in the BART_HOME/bin directory.
[ -c config_file_path ]
-p mbm_file |
wal_file |
The default approach is that the WAL scanner gets notified whenever a new WAL file arrives in the archived_wals directory of the BART backup catalog. It then scans the WAL file and produces the MBM file. This approach does not work in some cases, for example when the WAL files are shipped to the BART backup catalog using the rsync utility and also in case of some specific platforms.
This results in the WAL files being copied to the archived_wals directory, but the WAL scanner is not aware of it so it does not scan them and produce the MBM files. This results in the failure of an incremental backup.
This can be avoided by using the timer based WAL scanning approach, which is done by using the scan_interval parameter in the BART configuration file (see sections 4.1 and 4.2.5). The value for scan_interval is the number of seconds after which the WAL scanner will look and scan the new WAL files.
See Section 4.2.3 for additional information on WAL scanning.
When the bart-scanner program is invoked, it forks a separate process for each database server enabled with the allow_incremental_backups parameter. See sections 4.2.5 for information on the allow_incremental_backups parameter.
If the --daemon option is omitted, then 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. See Section 4.1 for information on the logfile parameter in the BART configuration file.
If the --daemon option is specified, then the WAL scanner process runs in the background. All output messages can be viewed in the BART log file.
If the BART_HOME/bin directory is not included in the BART user account’s PATH environment variable, then BART_HOME/bin must be the current working directory when invoking the WAL scanner. The general invocation syntax would appear as follows:
cd BART_HOME/bin
Note: The BART user account’s LD_LIBRARY_PATH environment variable may need to be set to include the directory containing the libpq library if invocation of the WAL scanner program fails. See Section 5.3 for information on setting LD_LIBRARY_PATH.
-h, --help
-v, --version
-d, --debug
-c, --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.
-p, --print mbm_file
Full directory path to an MBM file whose content is to be printed. The archive path directory backup_path/server_name/archived_wals contains the MBM files. Note: This option is to be used for assisting the EnterpriseDB support team for debugging problems that may have been encountered.
Full directory path to a WAL file to be scanned. The archive path directory backup_path/server_name/archived_wals contains the WAL files. Use it if a WAL file in the archive path is missing its MBM file.
Reload the BART configuration file. The keyword RELOAD is case-insensitive. This 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 the WAL scanner. The keyword STOP is case-insensitive.
To stop the interactively running WAL scanner either enter cntrl-C at the terminal running the WAL scanner or invoke the bart-scanner program from another terminal with the STOP option:
Should it be necessary 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 in the following example:

5 Operation : 5.5 Running the BART WAL Scanner

Table of Contents Previous Next