Table of Contents Previous Next


1 Quickstart : 1.4 Taking a Backup

The syntax of the BACKUP subcommand is:
bart BACKUP –s { server_name | all } [ -F { p | t } ]
[ -z ] [ –c compression_level ]
[ --parent { backup_id | backup_name } ]
[ --backup-name backup_name ]
[ --thread-count number_of_threads ]
Note: While a BACKUP subcommand is in progress, no other processes must run in parallel.
Specify the –s option, and replace the server_name with the name of the server that will be backed up (it must be configured in the BART configuration file). Specify all to take a backup of all servers. The -s option is mandatory.
Along with the bart BACKUP –s server_name or bart BACKUP –s all subcommand, specify the following options only if required. If you do not specify any of the following options, backup is created with the default setting:
Specify the –F p option to create backup in the plain text format and –F t to create backup in the tar format (default). If the transaction log streaming method is used, then the -F p option must be specified.
Specify the –z option to use gzip compression on the tar file output using the default compression level. This option is applicable only for the tar format.
Specify the –c option to apply the gzip compression level on the tar file output, and replace compression_level with the digit 1 through 9, with 9 being the best compression (applicable only for the tar format).
Specify the --parent option and replace backup_id with the backup identifier of a parent backup or replace backup_name with the parent backup name to take an incremental backup. Incremental backup can only be taken in the plain text format (–F p). Specify the option --check before taking an incremental backup to verify if the required MBM files are present in the BART backup catalog. The --parent option must be specified when the --check option is used.
Specify the --backup-name option and replace backup_name with the user-friendly name assigned to the backup.
Specify the –thread count option and replace number_of_threads with the number of worker threads to run in parallel to copy blocks for incremental backups.
Specify --with-pg_basebackup option to use pg_basebackup to take a full backup. The number of thread counts in effect is ignored as given by the thread_count parameter in the BART configuration file.
Note: If the thread count in effect is greater than 1, then the pg_basebackup utility is not used to take the full backup unless the --with-pg_basebackup option is specified with the BACKUP subcommand.
Specify the --no pg_basebackup option to not use pg_basebackup to take a full backup.
The following example creates a full backup for the server name mktg in the default tar format with gzip compression.
The following example shows an incremental backup taken by specifying the --parent option. The -F p option must be specified as well for plain text format.

1 Quickstart : 1.4 Taking a Backup

Table of Contents Previous Next