Configuring the New Tool v2.6

This section draws a comparison between the three tools and shows how they differ in configuration (config file), and in scheduling. During a migration it is important to be aware of all of these differences, and apply changes as necessary.

How Features are Configured

The following sections describes how to enable features in the different tools so you can easily compare the implementation details .

Postgres connection details

ToolConfiguration
BARTIn the [SERVER] section of the config file:
[example]
...
host = localhost
user = postgres
port = 5432
BarmanIn the config file:
[example]
...
conninfo = host=localhost user=postgres dbname=postgres
pgBackRest*In the config file:
[example]
...
pg1-host = localhost
pg1-path = /var/lib/postgres/data
pg1-user = postgres
port = 5432

* Specify pg1-path when pgBackRest is running locally, and specify pg1-host when pgBackRest is running remote

Use of direct file copy mode (ssh or rsync) instead of pg_basebackup

ToolConfiguration
BARTIncrease threads >1 in the [SERVER] or [BART] section of the config file:
[example]
...
thread_count = 2
Or, as a commandline option
--no-pg_basebackup
BarmanIn the config file:
[example]
...
backup_method = rsync
pgBackRestpgBackRest does not support pg_basebackup option

Incremental backups

ToolConfiguration
BARTRetrieve the backup_id or backup_name for the parent:
bart SHOW-BACKUPS example
Now supply he backup_id or backup_name as parent:
bart BACKUP –s example --parent { backup_id | backup_name }
BarmanIn the config file:
[example]
...
reuse_backup = link
Or, as a command line option:
--reuse-backup=link
pgBackRestpgbackrest --stanza=example --type=incr backup

WAL archive compression**

ToolConfiguration
BARTIn the [SERVER] or [BART] section of the config file:
[example]
...
wal_compression = enabled
BarmanIn the config file:
[example]
...
compression = gzip
pgBackRestGlobal compress settings. Can be overloaded for [global:archive-push]

Backup compression

ToolConfiguration
BARTCommand line option:
Enable: --gzip
Level: --compress-level
BarmanN/A
pgBackRestcompress=y
compress-level=9
compress-type=gz
compress-level-network=3

Parallel backup and restore

ToolConfiguration
BARTSet thread_cound in the [SERVER] or [BART] section of the config file:
[example]
...
thread_count = 4
Or, as a Command line option
--thread-count=4
BarmanSet parallel_jobs in the configfile:
[example]
...
parallel_jobs = 4
Or, as a command line option
--jobs 4
pgBackRestSet process-max in the configfile:
[example]
...
process-max = 4
Or, as a command line option
--process-max=4

Retention Policy

ToolConfiguration
BARTSet retention_policy in the [SERVER] or [BART] section of the config file:
[example]

retention_policy = 2 BACKUPS # Or DAYS, WEEKS, or MONTHS
BarmanSet retention_policy, and/or wal_retention_policy options in the config file:
[example]

retention_policy =REDUNDANCY 2
or
retention_policy = RECOVERY WINDOW OF 2 DAYS # WEEKS/MONTHS.
pgBackRestCan be set in the config file:
[example]
repo-retention-full-type = count #can also be time
repo-retention-full = 2
repo-retention-diff = 6
# Retain WAL archives for only 1 full backup:
repo-retention-archive-type = full #can also be diff or incr
repo-retention-archive = 1
See Retention Policy in edb documentation for more information.

Configure repository location

ToolConfiguration
BARTIn the config file in the [BART] section:
[BART]

backup_path = /tmp/bart
BarmanIn the config file in the main chapter:
backup_directory = /tmp/barman
pgBackRest[global]
repo1-path=/var/lib/pgbackrest