Table of Contents Previous Next


5 Operation : 5.3 Basic BART Subcommand Usage

BART is used by invoking the bart program located in the BART_HOME/bin directory with the desired subcommand and any applicable subcommand options. The subcommands available with BART are the following:
CHECK-CONFIG. Check the setting of the parameters in the BART configuration file and the proper setup of the database servers for WAL archiving and the taking of backups. See Section 5.4.1.
INIT. Create the BART backup catalog directories, set the Postgres archive_command parameter from the setting of the BART archive_command parameter, and rebuild the backupinfo files. See Section 5.4.2.
BACKUP. Take a full backup or an incremental backup. See Section 5.4.3.
SHOW-SERVERS. Display the database servers managed by BART. See Section 5.4.4.
SHOW-BACKUPS. Display information for the backups taken by BART. See Section 5.4.5.
VERIFY-CHKSUM. Verify the checksums on the full backups. See Section 5.4.6.
MANAGE. Manage backups using the retention policy. Compress the archived WAL files. See Section 5.4.7.
RESTORE. Restore a backup and generate an appropriate recovery.conf file including, if desired, a restore_command for restoring archived WAL files for point-in-time recovery. See Section 5.4.8.
DELETE. Delete a backup. See Section 5.4.9.
bart [ gen_option ]... [ subcmd ] [ subcmd_option ]...
Though recommended that the BART_HOME/bin directory be included in the BART user account’s PATH environment variable, the bart program can be invoked from BART_HOME/bin as the current working directory. The invocation steps would appear as follows:
cd BART_HOME/bin
./bart [ gen_option ]... [ subcmd ] [ subcmd_option ]...
Note: The command export PATH=.:$PATH is needed for including the current working directory BART_HOME/bin in the PATH. This is required since invocation of the bart program for certain BART subcommands calls the bart-scanner program located within BART_HOME/bin.
Note: If execution of BART subcommands fail with the following error message, then LD_LIBRARY_PATH needs to be set to include the libpq library directory:
Set the LD_LIBRARY_PATH environment variable for the BART user account to include the directory containing the libpq library. This directory is POSTGRES_INSTALL_HOME/lib as shown by the following example:
It is suggested that the PATH and the LD_LIBRARY_PATH environment variable settings be placed in the BART user account’s profile. See Step 3 in Section 4.1.
The following are the general BART options denoted as gen_option in the preceding syntax diagrams.
-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.

5 Operation : 5.3 Basic BART Subcommand Usage

Table of Contents Previous Next