BART Management Overview v2.6
After configuring BART, you can begin the backup and recovery management process. The following steps will help you get started:
- Run the
CHECK-CONFIG
subcommand without the-s
option. When theCHECK-CONFIG
subcommand is used without specifying the-s
option, it checks the parameters in the global section of the BART configuration file. - Run the
INIT
subcommand (if you have not already done so) to finish creation of the BART backup catalog, which results in the complete directory structure to which backups and WAL files are saved. This step must be done before restarting the database servers with enabled WAL archiving, otherwise the copy operation in thearchive_command
parameter of thepostgresql.conf
file or thepostgresql.auto.conf
file fails due to the absence of the target archive directory. When the directory structure is complete, thearchived_wals
subdirectory should exist for each database server. - Start the Postgres database servers with archiving enabled. Verify that the WAL files are appearing in the
archive_path
. The archiving frequency is dependent upon otherpostgresql.conf
configuration parameters. Check the Postgres database server log files to ensure there are no archiving errors. Archiving should be operational before taking a backup in order to ensure that the WAL files that may be created during the backup process are archived. - Start the WAL scanner if you intend to take incremental backups. Since the WAL scanner processes the WAL files copied to the
archive path
, it is advantageous to commence the WAL scanning as soon as the WAL files begin to appear in thearchive_path
in order to keep the scanning in pace with the WAL archiving. - Run the BART
CHECK-CONFIG
subcommand for each database server with the-s
option specifying the server name. This ensures the database server is properly configured for taking backups. - Create a full backup for each database server. The full backup establishes the starting point of when point-in-time recovery can begin and also establishes the initial parent backup for any incremental backups to be taken.
There are now a number of other BART management processes you may perform:
- Execute the
BACKUP
subcommand to create additional full backups or incremental backups. - Use the
VERIFY-CHKSUM
subcommand to verify the checksum of the full backups. - Display database server information with the
SHOW-SERVERS
subcommand. - Display backup information with the
SHOW-BACKUPS
subcommand. - Compress the archived WAL files in the
archive_path
by enabling WAL compression in the BART configuration file and then invoking theMANAGE
subcommand. - Determine and set the retention policy for backups in the BART configuration file.
- Establish the procedure for using the
MANAGE
subcommand to enforce the retention policy for backups. This may include usingcron
jobs to schedule theMANAGE
subcommand.
performing_a_restore_operation point_in_time_recovery_operation