Table of Contents Previous Next


4 Configuration : 4.2 Configuring a Database Server for BART Management : 4.2.5 Adding a Database Server to the BART Configuration File

[ServerName]. Identifies an entry for a database server in the server section of the configuration file. This is the name by which you refer to the database server using BART. The name is case-insensitive when referenced with BART subcommand options. A lowercase conversion of this name is used to create a subdirectory in the BART backup catalog for storing the backups and WAL files for this database server. This parameter is required.
backup_name. Template for user-defined, friendly names to be assigned to the backups of the database server. The template is an alphanumeric string that may include the following variables to be substituted by the timestamp values when the backup is taken: 1) %year – 4-digit year, 2) %month – 2-digit month, 3) %day – 2-digit day, 4) %hour – 2-digit hour, 5) %minute – 2-digit minute, and 6) %second – 2-digit second. To include the percent sign (%) as a character in the backup name, specify %% in the template. Do not enclose the template string in quotes even if you want the template to include space characters, otherwise the enclosing quotes are stored as part of the backup name. Use of space characters in the backup name, however, then requires enclosing the backup name in quotes when referenced with the -i option by BART subcommands. The maximum permitted length of backup names is 49 characters. This parameter can be overridden by the --backup-name option of the BACKUP subcommand. If this parameter is omitted from the BART configuration file, and the --backup-name option with a user-defined name is not specified with the BACKUP subcommand, then the backup can only be referenced in BART subcommands by the BART assigned, integer backup identifier.
host. IP address of the database server to be configured for backup. This parameter is required.
port. Port number identifying the database server instance (that is, the relevant database cluster) to be backed up. This parameter is optional. If omitted, the default is port 5444.
user. Replication database user name used by BART: 1) to establish the connection to the database server for full backups, 2) to set the Postgres archive_command configuration parameter when running the INIT subcommand, 3) to take incremental backups. This database user must be a superuser. Note: While running as the BART user account, the connection to the database server using this database user must not prompt for a password. Also, the pg_hba.conf file must contain a replication connection entry for this database user name. See Section 4.2.2 for more information. This parameter is required.
archive_command. This is the BART archive_command parameter. The content and variables specified in the BART archive_command result in the archive command string to be generated into the Postgres archive_command configuration parameter in the postgresql.auto.conf file when the INIT subcommand is used. Note that this BART archive_command parameter in the BART configuration file and the Postgres archive_command parameter in the postgresql.conf file and the postgresql.auto.conf file refer to two separate, distinct parameters that are to be set in different manners and have different resulting outcomes. Be sure to carefully observe the distinction between the BART archive_command and the Postgres archive_command when configuring these parameters according to the instructions. The following information applies only to the BART archive_command parameter. Enclose the command string within single quotes ('). Even if the archive_command parameter is omitted, it still results in its usage by the INIT subcommand as if it were actually specified with a setting of 'scp %p %h:%a/%f'. Variables are the following: 1) %p – path of the file to archive used by the Postgres archiving process, 2) %h – replaced by the bart_host parameter setting, 3) %a – replaced by the BART archive path, and 4) %f – archived file name used by the Postgres archiving process. See Section 4.2.3.2 for additional information.
cluster_owner. Linux operating system user account that owns the database cluster. This is typically enterprisedb for Advanced Server database clusters installed in the mode compatible with Oracle databases, or postgres for PostgreSQL database clusters and for Advanced Server database clusters installed in the mode compatible with PostgreSQL databases. This parameter is required.
remote_host. IP address of the remote server to which a backup is to be restored. The value for this parameter must be specified in the form remote_user@remote_host_address where remote_user is the user account on the target database server host that accepts a password-less SSH/SCP login connection from the BART user account, and is the owner of the directory where the backup is to be restored. remote_host_address is the IP address of the remote host. For restoring a backup to a remote host or for restoring any backup where remote_user and the BART user account are not the same users, either this parameter must be set, or it may be specified with the -r option with the BART RESTORE subcommand.
tablespace_path. Paths to which tablespaces are to be restored specified in format OID=tablespace_path;OID=tablespace_path … If the backup is to be restored to a remote host such as specified by the remote_host parameter, then the tablespace paths must exist on the remote host. This parameter is optional.
retention_policy. Determines when an active backup should be marked as obsolete, and hence, be a candidate for deletion. The setting can be either max_number BACKUPS, max_number DAYS, max_number WEEKS, or max_number MONTHS where max_number is a positive integer. If all of the keywords BACKUPS, DAYS, WEEKS, and MONTHS are omitted, the specified integer is interpreted as max_number BACKUPS by default. The setting of the retention_policy parameter in the server section of the BART configuration file overrides the setting of retention_policy in the global section. If omitted in the server section, the setting of retention_policy in the global section is used. If the retention_policy parameter is not specified in either section, then no additional backups are marked as obsolete when the MANAGE subcommand is used. See Section 5.2 for information on managing backups using a retention policy.
xlog_method. Determines how the transaction log is collected during execution of pg_basebackup through the BACKUP subcommand. Set to fetch to collect the transaction log files after the backup has completed. Set to stream to stream the transaction log in parallel with the full backup creation. If stream is used, the max_wal_senders configuration parameter in the postgresql.conf file for this database server must account for an additional session for the streaming of the transaction log, (that is, the setting must be a minimum of 2). The setting of the xlog_method parameter in the server section of the BART configuration file overrides the setting of xlog_method in the global section. If omitted in the server section, the setting of xlog_method in the global section is used. If the xlog_method parameter is not specified in either section, the default is fetch.
wal_compression. Enables the compression of archived WAL files in the BART backup catalog when the MANAGE subcommand is invoked. Set to enabled to compress the archived WALS files in gzip format. Set to disabled to leave the files uncompressed. Note: The gzip compression program must be in the BART user account’s PATH. Note: Compression of archived WAL files is not permitted for database servers on which incremental backups are to be taken. The setting of the wal_compression parameter in the server section of the BART configuration file overrides the setting of wal_compression in the global section. If omitted in the server section, the setting of wal_compression in the global section is used. If the wal_compression parameter is not specified in either section, the default is disabled. See Section 5.4.7 for information on using the MANAGE subcommand for WAL compression.
copy_wals_during_restore. Determines how the archived WAL files are collected when invoking the RESTORE subcommand. Set to enabled to copy the archived WAL files from the BART backup catalog to the restore_path/archived_wals directory prior to the database server archive recovery. Set to disabled to retrieve the archived WAL files directly from the BART backup catalog during the database server archive recovery. The BART generated restore_command parameter in the recovery.conf file reflects which of the two options is used. If the RESTORE subcommand is invoked with the -c option, then the archived WAL files are copied from the BART backup catalog to the restore_path/archived_wals directory, thus overriding any setting of the copy_wals_during_restore parameter in the BART configuration file. If the RESTORE subcommand is invoked without the -c option, then the following determines how the archived WAL files are restored: The setting of the copy_wals_during_restore parameter in the server section of the BART configuration file overrides the setting of copy_wals_during_restore in the global section. If omitted in the server section, the setting of copy_wals_during_restore in the global section is used. If the copy_wals_during_restore parameter is not explicitly set in either section, the default is disabled. See Section 5.4.8 for additional information.
allow_incremental_backups. Enables usage of the WAL scanner for incremental backups. Permits taking of an incremental backup when the BACKUP subcommand is invoked with the --parent option. Set to enabled to permit incremental backups. Set to disabled to disallow incremental backups and thus permit only full backups. If the allow_incremental_backups parameter is not specified, the default is disabled. See Section 5.4.3 for information on using the BACKUP subcommand for taking incremental backups. See Section 5.5 for information on running the WAL scanner. See Section 2.1 for general information on incremental backups.
thread_count. Specifies the number of worker threads for copying blocks from the database server to the BART backup catalog when the BACKUP subcommand is invoked for incremental backups. The same approach applies to full backups where the worker threads copy data files from the database server to the BART backup catalog. The same set of processes are used for the compression operation when taking full backups in order to provide parallel, compressed backups when the BACKUP subcommand is specified with the -z or -c options.
Note: If parallel backup is run with N number of worker threads, then it will initiate N+ 1 concurrent connections with the server.
Note: The compression operation does not apply to incremental backups.
o
If the BACKUP subcommand is invoked with the --thread-count option, then the number of worker threads specified by this option overrides any setting of the thread_count parameter in the BART configuration file.
o
If the BACKUP subcommand is invoked without the --thread-count option, then the following determines the number of worker threads used: The setting of the thread_count parameter in the server section of the BART configuration file overrides the setting of thread_count in the global section. If omitted in the server section, the setting of thread_count in the global section is used. If the thread_count parameter is not specified in either section, the default is 1.
Note: When taking a full backup, if the thread count in effect is only 1, then the pg_basebackup utility is used to take the full backup unless the --no-pg_basebackup option is specified with the BACKUP subcommand.
batch_size. Specifies the number of blocks of memory used for copying modified blocks from the database server to the BART backup catalog when the BACKUP subcommand is invoked for incremental backups. Each block is 8192 bytes. The maximum permitted value is 131072 (131072 * 8192 = 1 GB). The minimum permitted value is 1 (1 * 8192 = 8192 bytes). Reduce the setting if the server complains that it has run out of memory while executing pg_read_binary_file(). The setting of the batch_size parameter in the server section of the BART configuration file overrides the setting of batch_size in the global section. If omitted in the server section, the setting of batch_size in the global section is used. If the batch_size parameter is not specified in either section, the default value of 49142 (49142 * 8192 = 3/8 GB) is used.
scan_interval. Specifies the number of seconds before forcing a scan of the WAL files in the archive directory of the BART backup catalog. The setting of the scan_interval parameter in the server section of the BART configuration file overrides the setting of scan_interval in the global section. If omitted in the server section, the setting of scan_interval in the global section is used. If the scan_interval parameter is not specified in either section, the default value of 0 is used, which means no brute-force scanning will be started.
mbm_scan_timeout. Specifies the number of seconds to wait for MBM files, before timing out. The mbm_scan_timeout parameter value must be greater than 0. If the value is 0 or negative, then an error will be displayed during an incremental backup. The setting of the mbm_scan_timeout parameter in the server section of the BART configuration file overrides the setting of mbm_scan_timeout in the global section for that particular database server. If omitted in the server section, the setting of mbm_scan_timeout in the global section is used. If the mbm_scan_timeout parameter is not specified in either section, the default value of 20 is used, which means after waiting for 20 seconds for MBM file, BART will time out.
Note: The mbm_scan_timeout parameter is applicable only for incremental backup.
description. Description of the database server. This parameter is optional.
pg_basebackup_path = /usr/edb/as11/bin/pg_basebackup

4 Configuration : 4.2 Configuring a Database Server for BART Management : 4.2.5 Adding a Database Server to the BART Configuration File

Table of Contents Previous Next