From 41637f0c43b717e1218064b08fd94b63013c582e Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Mon, 7 Oct 2019 11:56:40 +0900 Subject: [PATCH] doc: improve instructions for cloning from Barman --- doc/cloning-standbys.xml | 78 ++++++++++++++++++++++++---------------- 1 file changed, 47 insertions(+), 31 deletions(-) diff --git a/doc/cloning-standbys.xml b/doc/cloning-standbys.xml index efa6aec3..d2868b53 100644 --- a/doc/cloning-standbys.xml +++ b/doc/cloning-standbys.xml @@ -78,8 +78,7 @@ - the barman_server setting in repmgr.conf is the same as the - server configured in Barman; + the Barman catalogue must include at least one valid backup for this server; @@ -90,28 +89,40 @@ - the restore_command setting in repmgr.conf is configured to - use the barman-wal-restore script - (see section - below). - - - - - the Barman catalogue includes at least one valid backup for this server. + the barman_server setting in repmgr.conf is the same as the + server configured in Barman. + + + + For example, assuming Barman is located on the host "barmansrv" + under the "barman" user account, + repmgr.conf should contain the following entries: + + barman_host=barman@barmansrv + barman_server=somedb + + - - Barman support is automatically enabled if barman_server - is set. Normally it is good practice to use Barman, for instance - when fetching a base backup while cloning a standby; in any case, - Barman mode can be disabled using the --without-barman - command line option. - + + To use a non-default Barman configuration file on the Barman server, + specify this in repmgr.conf with barman_config: + + barman_config=/path/to/barman.conf + + + + + We also recommend configuring the restore_command setting in repmgr.conf + to use the barman-wal-restore script + (see section below). + + + If you have a non-default SSH configuration on the Barman @@ -139,6 +150,17 @@ NOTICE: you can now start your PostgreSQL server HINT: for example: pg_ctl -D /var/lib/postgresql/data start + + + + Barman support is automatically enabled if barman_server + is set. Normally it is good practice to use Barman, for instance + when fetching a base backup while cloning a standby; in any case, + Barman mode can be disabled using the --without-barman + command line option. + + + Using Barman as a WAL file source @@ -159,31 +181,25 @@ package (Barman 2.0 ~ 2.7) or as part of the core Barman distribution (Barman 2.8 and later). - To use barman-wal-restore with &repmgr; - and assuming Barman is located on the barmansrv host + To use barman-wal-restore with &repmgr;, + assuming Barman is located on the host "barmansrv" + under the "barman" user account, and that barman-wal-restore is located as an executable at /usr/bin/barman-wal-restore, repmgr.conf should include the following lines: - barman_host=barmansrv + barman_host=barman@barmansrv barman_server=somedb restore_command=/usr/bin/barman-wal-restore barmansrv somedb %f %p barman-wal-restore supports command line switches to - control parallelism (--parallel=N) and compression ( - --bzip2, --gzip). + control parallelism (--parallel=N) and compression + (--bzip2, --gzip). - - - To use a non-default Barman configuration file on the Barman server, - specify this in repmgr.conf with barman_config: - - barman_config=/path/to/barman.conf - - +