2 OverviewBART provides a simplified interface for the continuous archiving and point-in-time recovery method provided with Postgres database servers. This consists of the following processes:
• Capturing a modified image of a database cluster called a block-level incremental backup, which is similar to a full backup, but contains the modified blocks of the relation files that have been changed since a previous backup instead of all, full relation files
• Archiving the Write-Ahead Log segments (WAL files), which continuously record changes to be made to the database files
• Performing Point-In-Time Recovery (PITR) to a specified transaction ID or timestamp with respect to a timeline using a full backup along with successive, that reside in the same backup chain, and the WAL filesDetailed information regarding WAL files and point-in-time recovery is documented in the PostgreSQL Core Documentation available at:Block-level incremental backups are referred to simply as incremental backups.The general term backup refers to both full backups and incremental backups. When a distinction must be made between the two, the complete term full backup or incremental backup is used.Note: For standby servers, only a full backup can be taken. Incremental backups cannot be taken from standby servers. For information about standby servers, see the PostgreSQL Core Documentation available at:When taking a full backup of a standby server, BART uses the PostgreSQL pg_basebackup utility program.For information about pg_basebackup, see the PostgreSQL Core Documentation available at:These features provide a complete backup and recovery methodology for Postgres database servers, however, the management of this process can be quite complex, especially when dealing with multiple database servers in a distributed environment.BART simplifies this management process by use of a centralized backup catalog, a single configuration file, and a command line interface controlling the necessary operations.Reasonable defaults are automatically used for various backup and restore options. BART also performs the necessary recovery file configuration required for point-in-time recovery by means of its command line interface.
• BART Host. The host system on which BART is installed. BART operations are invoked from this host system. The database server backups and archived WAL files are stored on this host as well.
• BART User Account. Linux operating system user account you choose to run BART. The BART user account owns the BART backup catalog directory.
• BART Configuration File. File in editable text format containing the configuration information used by BART.
• BART Backup Catalog. File system directory structure containing all of the backups and archived WAL files for the database servers managed by BART.
• BART Backupinfo File. File in text format containing information for a BART backup. A backupinfo file resides in each backup subdirectory within the BART backup catalog.
• BART Command Line Utility Program. Single, executable file named bart, which is used to commence all BART operations.
• BART WAL Scanner Program. Single, executable file named bart-scanner, which is used to scan WAL files to locate and record the modified blocks for incremental backups.
• Postgres Database Cluster. Also commonly called the data directory, this is the file system directory where all of the data files related to a particular Postgres database server instance are stored. (Each specific running instance is identified by its host and port number when connecting to a database.) The database cluster is identified by the –D option when it is created, started, stopped, etc. by the Postgres initdb and pg_ctl commands. Typically by default, the initial database cluster is located in directory POSTGRES_INSTALL_HOME/data. A full backup is a copy of a database cluster.Note: The terms database cluster and database server are used somewhat interchangeably throughout this document, though a single database server can run multiple database clusters.
• Postgres User Account. Linux operating system user account that runs the Advanced Server or PostgreSQL database server and owns the database cluster directory.
o By default, the database user account is enterprisedb when Advanced Server is installed to support compatibility with Oracle databases.
o By default, the database user account is postgres when Advanced Server is installed in PostgreSQL compatible mode.Note: The BART configuration parameter cluster_owner must be set to the database user account for each database server. See Section 4.2.5 for information.
• Replication Database User. For each database server managed by BART, a database superuser must be selected to act as the replication database user. This database user is used to connect to the database server when backups are taken. The database superusers created with an initial Postgres database server installation (enterprisedb or postgres) may be used for this purpose.Note: The BART configuration parameter user must be set to this replication database user for each database server. See Section 4.2.5 for information.
• Secure Shell (SSH)/Secure Copy (SCP). Linux utility programs used to log into hosts (SSH) and copy files (SCP) between hosts. A valid user account must be specified that exists on the target host and in effect, is the user account under which the SSH or SCP operations occur.