# Postgres Replication

**URL:** <https://forums.docker.com/t/postgres-replication/65311>\
**Category:** General\
**Created:** [December 18, 2018, 3:12pm UTC](https://forums.docker.com/t/postgres-replication/65311 "2018-12-18T15:12:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![m0rt1s](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@m0rt1s](https://forums.docker.com/u/m0rt1s)\
**Post date:** [December 18, 2018, 3:12pm UTC](https://forums.docker.com/t/postgres-replication/65311/1 "2018-12-18T15:12:09Z")

</div>

Hello good day.  
I had problems to make a replication in my container with Postgresql, below I tell you how to make the configuration of the master:

→config de pg\_hba.conf  
host replication postgres xx.xx.xx.xx/32 md5

→ Configuracion postgres.conf  
wal\_level = hot\_standby  
max\_wal\_senders = 8

and to make the database copy

> docker exec -ti container\_slave pg\_basebackup -D /home/Data/data\_r -h IP\_Container\_Master -p 5432 -U postgres -W -P -v --xlog-method=stream -R

in the container log marks this for me:  
pg\_basebackup: directory ‘;/home/Data/data\_r exists but is not empty’

2.-  
docker exec -ti Container\_Master pg\_basebackup -D /home/Data/data\_r -U postgres -W -P -v --xlog-method=stream -R  
Password:

Log:  
pg\_basebackup: could not connect to server: FATAL: no pg\_hba.conf entry for replication connection from host ‘Local’ user ‘postgres’, SSL off
