To configure the BART host and each database server that is to be managed by BART you must:
Establish the BART user account and ensure it runs the
bart.cfg.samplefile to create the
bart.cfgfile. The BART configuration file is located in BART_HOME/
cp bart.cfg.sample bart.cfg
Set the environment variable for the BART user account. If the
libpqlibrary does not reside in the default installation location, you must add the
libpqlibrary to the
LD_LIBRARY_PATHenvironment variable and place the following settings in the BART user account’s profile so they take effect upon login:
# .bash\_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs export LD_LIBRARY_PATH=/usr/edb/as11/lib:$LD_LIBRARY_PATH
- Set the following parameters in the
[BART]section of the BART configuration file:
bart_host (required)Specify this parameter value in the form of
backup_path (required)Create the BART backup catalog and specify the path to the file system parent directory where BART database server backups and archived WAL files are stored. Ensure the BART user account owns the location specified in the
pg_basebackup_path (required)Specify the path to the
pg_basebackupprogram on the BART host.
xlog_method (optional)Set to
fetch(default) to collect the transaction log files after the backup is completed. Set to
streamto stream the transaction log in parallel with the full backup creation.
retention_policy (optional)Specify when an active backup should be marked as obsolete when the
MANAGEsubcommand is used. Specify
max_number BACKUPS(default setting),
max_number WEEKS, or
max_numberis a positive integer.
wal_compression (optional)Set to
enabledto compress the archived WAL files in gzip format when the
MANAGEsubcommand is invoked. Please note: The gzip compression program must be in the BART user account’s
copy_wals_during_restore (optional)Set to
enabledto copy the archived WAL files from the BART backup catalog to the restore_path/archived_wals directory prior to the database server archive recovery.
logfileto specify the path to the location to which output from the bart program is written. The log file will be created the first time you invoke the bart command using the sample configuration file value.
scanner_logfileto specify the path to the location to which output from the
bart-scannerprogram is written. The scanner log file will be created the first time you invoke the
bartcommand using the sample configuration file value.
Specify the number of worker threads to copy blocks from the database server to the BART backup catalog when the
BACKUPsubcommand is invoked for incremental backups.
When taking a full backup, if the thread count is 1, then the
pg_basebackuputility is used to take the full backup unless the
--no-pg_basebackupoption is specified with the
batch_size (optional)Specify the number of blocks of memory used for copying modified blocks from the database server to the BART backup catalog when the
BACKUPsubcommand is invoked for incremental backups. The maximum permitted value is 131072 (131072 * 8192 = 1 GB). The minimum permitted value is 1 (1 * 8192 = 8192 bytes).
scan_interval (optional)Specify the number of seconds before forcing a scan of the WAL files in the archive directory of the BART backup catalog. The default value is 0, which means no brute-force scanning will be started.
mbm_scan_timeout (optional)Specify the number of seconds to wait for MBM files before timing out; the default value is 20 seconds. The
mbm_scan_timeoutparameter value must be greater than 0. The
mbm_scan_timeoutparameter is applicable only for incremental backup.
workers (optional)Specify the number of parallel worker processes required to stream the modified blocks of an incremental backup to the restore host. The default value is
- Invoke the
CHECK-CONFIGsubcommand omitting the
-soption to check the parameter settings in the BART configuration file including
- Set the following parameters for each database server in the server section of the BART configuration file. The parameter setting in the server section overrides the setting in the global [BART] section for that particular database server.
[ServerName] (required)Specify a database server name.
backup_name (optional)Specify user-friendly name for the backups of the database server.
host (required)Specify the IP address of the database server to be configured for backup.
port (optional)Specify the port number identifying the database server instance to be backed up. The default is port
user (required)Specify the replication database user name used by BART to establish the connection to the database server for full backups.
INITsubcommand is used, the content and variables specified in the BART
archive_commandresult in the
archive commandstring to be generated into the Postgres
archive_commandparameter in the
postgresql.auto.conffile. The following information applies only to the BART
Enclose the command string within single quotes (‘).
archive_commandparameter is omitted, it still results in its usage by the
INITsubcommand with a setting of
'scp %p %h:%a/%f'where
%pis the path of the file to archive used by the Postgres archiving process,
%his replaced by the
%ais replaced by the BART archive path, and
%fis the archived file name used by the Postgres archiving process.
cluster_owner (required)Specify the Linux operating system user account that owns the database cluster. This is typically
enterprisedbfor Advanced Server clusters installed in compatible mode, or
postgresfor PostgreSQL or Advanced Server clusters installed in the PostgreSQL compatible mode.
remote_host (optional)Specify this parameter value in the form of
<remote_user>@<remote_host_address>where remote_user is the user account on the target database server host and remote_host_address is the IP address of the remote host.
tablespace_path (optional)Specify the path to which tablespaces are to be restored in the
OID = tablespace_path; OID = tablespace_path… format. If the backup is to be restored to a remote host (specified by the
remote_hostparameter), then the tablespace must exist on the remote host.
allow_incremental_backups (optional)Set to
enabledto permit incremental backups.
description (optional)Specify the database server description.
For detailed information about configuring the optional parameters in the server section, refer to the BART Installation and Upgrade Guide available at: