PostgreSQL : ajout info pour barman
This commit is contained in:
parent
aa8082e5b5
commit
1fab8b8e5c
|
@ -829,14 +829,41 @@ pgbouncer=# show help;
|
||||||
|
|
||||||
### barman
|
### barman
|
||||||
|
|
||||||
[barman](http://www.pgbarman.org/) est un outil pour gérer les sauvegardes et les restaurations
|
[barman](http://www.pgbarman.org/) est un outil pour gérer les sauvegardes et les restaurations de données en se basant sur les log de transactions (WAL) de PostgreSQL.
|
||||||
|
|
||||||
|
Barman s'installe généralement sur le serveur de sauvegarde :
|
||||||
~~~
|
~~~
|
||||||
# apt install barman barman-cli
|
# apt install barman barman-cli
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
Voir [la documentation Barman](http://docs.pgbarman.org/release/2.3/).
|
Pour chaque serveur PostgreSQL à sauvegarder, on créé un fichier dans '/etc/barman.d/' :
|
||||||
|
|
||||||
|
~~~
|
||||||
|
[foo]
|
||||||
|
description = "foo.example.net 9.6/main PostgreSQL instance"
|
||||||
|
|
||||||
|
ssh_command = ssh postgres@foo.example.net
|
||||||
|
conninfo = host=foo.example.net user=barman dbname=postgres
|
||||||
|
|
||||||
|
backup_method = rsync
|
||||||
|
reuse_backup = link
|
||||||
|
|
||||||
|
archiver = on
|
||||||
|
|
||||||
|
last_backup_maximum_age = 1 DAY
|
||||||
|
~~~
|
||||||
|
|
||||||
|
Il faut ensuite autoriser barman à se connecter en SSH et PostgreSQL sur la machine à sauvegarder.
|
||||||
|
|
||||||
|
Dans la configuration de PostgreSQL, rajouter les directives suivantes :
|
||||||
|
|
||||||
|
~~~
|
||||||
|
wal_level = 'replica' # ou plus haut
|
||||||
|
archive_mode = on
|
||||||
|
archive_command = 'rsync -a %p barman@foo.example.com:foo/incoming/%f'
|
||||||
|
~~~
|
||||||
|
|
||||||
|
Voir [la documentation Barman](http://docs.pgbarman.org/release/2.3/).
|
||||||
|
|
||||||
### pgbadger
|
### pgbadger
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue