BART Subcommand Syntax and Examples v2.6
This section briefly describes each BART subcommand and provides an example.
Invoking BART
BART subcommands are invoked at the Linux command line as a BART user. You can invoke the bart
program (located in the <BART_HOME>/bin
directory) with the desired options to manage your BART installation.
The following examples demonstrate ways of invoking BART. In these examples, the BART user account is named bartuser
.
$ su bartuser Password: $ export LD_LIBRARY_PATH=/opt/PostgresPlus/9.6AS/lib/:$LD_LIBRARY_PATH $ ./bart SHOW-SERVERS
To run BART from any current working directory:
$ su bartuser Password: $ export LD_LIBRARY_PATH=/opt/PostgresPlus/9.6AS/lib/:$LD_LIBRARY_PATH $ bart SHOW-SERVERS
Syntax for invoking BART
bart [ <general_option> ]... [ <subcommand> ] [<subcommand_option>]...
You can use either abbreviated or long option forms on the command line (for example -h
or --help
).
General Options
You can specify the following general options with bart
.
-h
or (--help
)
- Displays general syntax and information about BART usage.
- All subcommands support a help option (
-h, --help
). If the help option is specified, information is displayed regarding that particular subcommand. The subcommand, itself, is not executed.
The following code sample displays the result of invoking the --help
option for the BACKUP
subcommand:
-bash-4.2$ bart BACKUP --help bart: backup and recovery tool Usage: bart BACKUP [OPTION]... Options: -h, --help Show this help message and exit -s, --server Name of the server or 'all' (full backups only) to specify all servers -F, --format=p|t Backup output format (tar (default) or plain) -z, --gzip Enables gzip compression of tar files -c, --compress-level Specifies the compression level (1 through 9, 9 being best compression) --backup-name Specify a friendly name for the current backup --parent Specify parent backup for incremental backup --check Verify checksum of required mbm files
-v
(or --version
)
The following code sample displays information returned by the bart --version
subcommand:
[edb@localhost bin]$ bart --version bart (EnterpriseDB) 2.5.2 [edb@localhost bin]$
-d
(or --debug
)
The following code sample displays debugging output returned by the bart MANAGE
subcommand:
-bash-4.1$ bart -d MANAGE -n DEBUG: Server: acctg, Now: 2015-04-17 16:34:03 EDT, RetentionWindow: 259200 (secs) ==> 72 hour(s) DEBUG: Server: dev, Now: 2015-04-17 16:34:03 EDT, RetentionWindow: 1814400 (secs) ==> 504 hour(s) DEBUG: Server: hr, Now: 2015-04-17 16:34:03 EDT, RetentionWindow: 7776000 (secs) ==> 2160 hour(s)
-c
(or --config-path) <config_file_path>
The following code sample demonstrates using the -c
option to specify a non-default configuration file name and installation location:
$ su bartuser Password: $ export LD_LIBRARY_PATH=/opt/PostgresPlus/9.6AS/lib/:$LD_LIBRARY_PATH $ bart -c /home/bartuser/bart.cfg SHOW-SERVERS
backup check_config delete init manage restore show_servers show_backups verify_chksum running_the_bart_wal_scanner