4

Maybe it's just too early in the morning, but I can't seem to get pg_basebackup working for a local user. This is part of testing for an hourly backup automated script. I added a line to pg_hba.conf for this and it looks like:

local replication postgres trust

But, this entry causes a FATAL error: no pg_hba.conf entry for replication connection from host "[local]", user "postgres", SSL off. What did I screw up? I'll be changing the user once I get this part working. The pg_basebackup command looks like:

pg_basebackup -D - -Ft -z -c fast -l hourly.backup > backup_file.gz

FYI, if I add "-h ", it does work as I do have another pg_hba.conf entry for:

host replication postgres 10.10.1.129 md5

Does local not work for replication entries?

(Using PostgreSQL 9.3)

asked Oct 29, 2014 at 12:37

1 Answer 1

2

The problem is: "localhost" can be UNIX sockets, IPv4 or IPv6. The first rule you passed is for UNIX sockets. Try to add a rule for IPv4 and one for IPv6. It should work then. Btw, a SIGHUP is enough in case you change pg_hba.conf.

answered Oct 29, 2014 at 13:00
1
  • Unix domain sockets are refered to with local and never localhost. Anyway the question never mentions localhost in the first place, so it's not obvious why it would even be involved here. Commented Oct 29, 2014 at 16:23

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.