pg11 barman

pg主机:

开用户

createuser -s -P barman

密码barman1234

创建replication用户

 createuser -P --replication streaming_barman

密码streaming_barman1234

 

ssh-keygen

 

 

 

barman主机:

密码写入~barman/.pgpass

pg:5432:postgres:barman:barman1234
192.168.219.30:5432:postgres:barman:barman1234
pg:5432:postgres:streaming_barman:streaming_barman1234
192.168.219.30:5432:postgres:streaming_barman:streaming_barman1234

使用barman的linux系统用户

psql -c 'select version()' -U barman -h 192.168.219.30 postgres

sudo -u barman psql -U streaming_barman -h pg \
 -c "IDENTIFY_SYSTEM" \
 replication=1

 

ssh-keygen

 

root@barman:/etc/barman.d# cat streaming-server.conf
[pg]
description = "Example of PostgreSQL Database (Streaming-Only)"
conninfo = host=pg user=barman dbname=postgres
streaming_conninfo = host=pg user=streaming_barman dbname=postgres
backup_method = postgres

 

posted @ 2020-04-27 15:47  alexhe  阅读(174)  评论(0编辑  收藏  举报