PostgreSQL PITR

180 Views Asked by At

I have a master\server setup with pgpool and postgres 9.5. Both servers are running on centOS7.

I wanted to setup a point in time recovery with base backups every saturday, eliminating the old xlogs.

The server is archiving the xlogs with success on a external filesystem.

But when I try to execute the basebackup command it gives the following error:

pg_basebackup: could not connect to server: FATAL: database "replication" does not exist.

1

There are 1 best solutions below

0
Muhammad Usama On

You seems to be missing the explicit HBA record for replication database, because specifying all does not covers the replication connections

host    replication    postgres             127.0.0.1/0               trust

The value replication specifies that the record matches if a replication connection is requested (note that replication connections do not specify any particular database). Otherwise, this is the name of a specific PostgreSQL database.