Trouble setting up Streaming Replication with Barman

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,
I am trying to set up streaming replication with barman, going down the tutorial. 

When I run/ I get:

$barman receive-wal --create-slot pg

ERROR: Cannot connect to server 'pg'

##############################################################
Both servers Ubuntu 18.04, Postgresql 12.1

These are the configurations I have set up so far:
The Main Postgres Server: ###############################
$nano /etc/postgresql/12/main/postgresql.conf
--------------------------------------------------
....
listening_addresses = '*'
wal_level = hot_standby
archive_mode = on
archive_command = 'cp %p /<my-wal_archive-dir-here>/%f'  
max_wal_senders =3
max_replication_slots = 3
wal_keep_segments = 512
hot_standby = on

$nano /etc/postgresql/12/main/pg_hba.conf
----------------------------------------------
....
host all barman  <my-barman-ipaddress-here>/32    md5
host all streaming_barman  <my-barman-ipaddress-here>/32    md5




The Barman Server (logged in as barman): ###############################
$psql -c 'SELECT version()' -U barman -h <my-ipaddress-here> postgres

                                               version
-----------------------------------------------------------------------------
PostgreSQL 12.1 (Ubuntu 12.1-1.pgdg18.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0, 64-bit
(1 row)

$cat /etc/barman.d/pg.conf
[pg]
description = "Streaming Replication"
conninfo = host=<my-pg-server-ipaddress-here> user=barman dbname=postgres
streaming_conninfo = host=<my-pg-server-ipaddress-here> user=streaming_barman dbname=postgres
backup_method = postgres
streaming_archiver = on
slot_name = barman


When I run/ I get:

$barman receive-wal --create-slot pg

ERROR: Cannot connect to server 'pg'



Thanks






[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux