|
| 1 | +--- |
| 2 | +title: "Configuring the New Tool" |
| 3 | + |
| 4 | +--- |
| 5 | + |
| 6 | +This section draws a comparison between the three tools and shows how |
| 7 | +they differ in configuration (config file), and in scheduling. During a |
| 8 | +migration it is important to be aware of all of these differences, and |
| 9 | +apply changes as necessary. |
| 10 | + |
| 11 | +### How Features are Configured |
| 12 | + |
| 13 | +The following sections describes how to enable features in the different tools so you can easily compare the implementation details . |
| 14 | + |
| 15 | +- [Postgres connection details](#postgres_conn_details) |
| 16 | +- [Use of direct file copy mode (ssh or rsync) instead of pg_basebackup](#direct_file_copy_mode) |
| 17 | +- [Incremental backups](#incremental_backup) |
| 18 | +- [WAL archive compression](#wal_archive_compression) |
| 19 | +- [Backup compression](#backup_compression) |
| 20 | +- [Parallel backup and restore](#parallel_backup_restore) |
| 21 | +- [Retention Policy](#retention_policy) |
| 22 | +- [Configure repository location](#config_repo_location) |
| 23 | + |
| 24 | +<div id='postgres_conn_details' class='registered_link'></div> |
| 25 | + |
| 26 | +#### Postgres connection details |
| 27 | + |
| 28 | + |
| 29 | +| Tool | Configuration | |
| 30 | +|---------------|---------------------------------------------------------| |
| 31 | +| BART | In the [SERVER] section of the config file: <br/>[example]<br/>...<br/>`host = localhost`<br/>`user = postgres` <br/>`port = 5432`| |
| 32 | +| Barman | In the config file: <br/> [example]<br/>...<br/>`conninfo = host=localhost user=postgres dbname=postgres`| |
| 33 | +| pgBackRest[^*]| In the config file: <br/> [example]<br/>...<br/>`pg1-host = localhost`<br/>`pg1-path = /var/lib/postgres/data`<br/>`pg1-user = postgres`<br/>`port = 5432`| |
| 34 | + |
| 35 | + [^*] Specify pg1-path when pgBackRest is running locally, and specify pg1-host when pgBackRest is running remote |
| 36 | +<div id='direct_file_copy_mode' class='registered_link'></div> |
| 37 | + |
| 38 | +#### Use of direct file copy mode (ssh or rsync) instead of pg_basebackup |
| 39 | + |
| 40 | +| Tool | Configuration | |
| 41 | +|------------|---------------------------------------------------------| |
| 42 | +| BART | Increase threads >1 in the [SERVER] or [BART] section of the config file:<br/>[example]<br/>...<br/>`thread_count = 2`<br/>Or, as a commandline option<br/> `--no-pg_basebackup`| |
| 43 | +| Barman | In the config file: <br/>[example]<br/>...<br/>`backup_method = rsync`| |
| 44 | +| pgBackRest | pgBackRest does not support pg_basebackup option| |
| 45 | + |
| 46 | +<div id='incremental_backup' class='registered_link'></div> |
| 47 | + |
| 48 | +#### Incremental backups |
| 49 | + |
| 50 | +| Tool | Configuration | |
| 51 | +|------------|---------------------------------------------------------| |
| 52 | +| BART | Retrieve the `backup_id` or `backup_name` for the parent:<br/>`bart SHOW-BACKUPS example`<br/>Now supply he `backup_id` or `backup_name` as parent:<br/>`bart BACKUP –s example --parent { backup_id \| backup_name }`| |
| 53 | +| Barman | In the config file:<br/>[example]<br/>...<br/>`reuse_backup = link`<br/>Or, as a command line option:<br/>`--reuse-backup=link`| |
| 54 | +| pgBackRest | `pgbackrest --stanza=example --type=incr backup`| |
| 55 | + |
| 56 | +<div id='wal_archive_compression' class='registered_link'></div> |
| 57 | + |
| 58 | +#### WAL archive compression** |
| 59 | + |
| 60 | +| Tool | Configuration | |
| 61 | +|------------|---------------------------------------------------------| |
| 62 | +| BART | In the [SERVER] or [BART] section of the config file: <br/> [example]<br/>...<br/>`wal_compression = enabled`| |
| 63 | +| Barman | In the config file:<br/>[example]<br/>...<br/>`compression = gzip`| |
| 64 | +| pgBackRest | Global compress settings. Can be overloaded for [global:archive-push]| |
| 65 | + |
| 66 | +<div id='backup_compression' class='registered_link'></div> |
| 67 | + |
| 68 | +#### Backup compression |
| 69 | + |
| 70 | +| Tool | Configuration | |
| 71 | +|------------|---------------------------------------------------------| |
| 72 | +| BART | Command line option: <br/>`Enable: --gzip`<br/>`Level: --compress-level`| |
| 73 | +| Barman | N/A| |
| 74 | +| pgBackRest | `compress=y`<br/>`compress-level=9`<br/>`compress-type=gz`<br/>`compress-level-network=3`| |
| 75 | + |
| 76 | + |
| 77 | +<div id='parallel_backup_restore' class='registered_link'></div> |
| 78 | + |
| 79 | +#### Parallel backup and restore |
| 80 | + |
| 81 | +| Tool | Configuration | |
| 82 | +|------------|---------------------------------------------------------| |
| 83 | +| BART | Set `thread_cound` in the [SERVER] or [BART] section of the config file:<br/> [example]<br/>...<br/>`thread_count = 4`<br/>Or, as a Command line option<br/> `--thread-count=4`| |
| 84 | +| Barman | Set `parallel_jobs` in the configfile:<br/>[example]<br/>...<br/>`parallel_jobs = 4`<br/>Or, as a command line option<br/> `--jobs 4`| |
| 85 | +| pgBackRest | Set `process-max` in the configfile:<br/>[example]<br/>...<br/>`process-max = 4`<br/>Or, as a command line option<br/> `--process-max=4`| |
| 86 | + |
| 87 | + |
| 88 | +<div id='retention_policy' class='registered_link'></div> |
| 89 | + |
| 90 | +#### Retention Policy |
| 91 | + |
| 92 | +| Tool | Configuration | |
| 93 | +|------------|---------------------------------------------------------| |
| 94 | +| BART | Set `retention_policy` in the [SERVER] or [BART] section of the config file:<br/>[example]<br/>…<br/>`retention_policy = 2 BACKUPS` # Or DAYS, WEEKS, or MONTHS| |
| 95 | +| Barman | Set `retention_policy`, and/or `wal_retention_policy` options in the config file:<br/>[example]<br/>…<br/>`retention_policy =REDUNDANCY 2`<br/>or<br/>`retention_policy = RECOVERY WINDOW OF 2 DAYS` # WEEKS/MONTHS.| |
| 96 | +| pgBackRest | Can be set in the config file:<br/>[example]…<br/>`repo-retention-full-type = count #can also be time`<br/>`repo-retention-full = 2`<br/>`repo-retention-diff = 6`<br/>`# Retain WAL archives for only 1 full backup:`<br/>`repo-retention-archive-type = full #can also be diff or incr`<br/>`repo-retention-archive = 1`<br/>See Retention Policy in [edb documentation](https://www.enterprisedb.com/docs/supported-open-source/pgbackrest/05-retention_policy/) for more information.| |
| 97 | + |
| 98 | +<div id='config_repo_location' class='registered_link'></div> |
| 99 | + |
| 100 | +#### Configure repository location |
| 101 | + |
| 102 | +| Tool | Configuration | |
| 103 | +|------------|---------------------------------------------------------| |
| 104 | +| BART | In the config file in the [BART] section:<br/>[BART]<br/>…<br/>`backup_path = /tmp/bart`| |
| 105 | +| Barman | In the config file in the main chapter:<br/>`backup_directory = /tmp/barman`| |
| 106 | +| pgBackRest | [global]<br/>`repo1-path=/var/lib/pgbackrest`| |
| 107 | + |
| 108 | + |
| 109 | + |
| 110 | + |
0 commit comments