PostgreSQL: FAILED

1,871 views
Skip to first unread message

Michael

unread,
Oct 14, 2015, 4:22:56 PM10/14/15
to Barman, Backup and Recovery Manager for PostgreSQL
Hi,

From barman server, I am able to ssh to postgres server without password

barman@backup$ ssh postgres@pg

Vice-versa, from postgres server, I am able to ssh to barman server without password

postgres@pg$ ssh barman@backup

But, when I try

barman@backup$ psql -c 'SELECT version()' -U postgres -h pg -p 5435 

-- Postgres is running on port 5435 on postgres server.

1) It asks me to provide a password of the postgres user. So, do I need to set something in pg_hba.conf on the postgres server

2) Also, if I don't specify the port such as

barman@backup$ psql -c 'SELECT version()' -U postgres -h pg

psql: could not connect to server: Connection refused
        Is the server running on host "pg" (10.152.239.133) and accepting
        TCP/IP connections on port 5432?

-----
# barman check main shows:

Server main:
        PostgreSQL: FAILED
        directories: OK
        retention policy settings: OK
        backup maximum age: OK (no last_backup_maximum_age provided)
        compression settings: OK
        minimum redundancy requirements: FAILED (have 0 backups, expected at least 1)  -- Not sure this error. It is set as minimum_redundancy = 1 in barman.conf
        ssh: OK (PostgreSQL server)
        not in recovery: OK

Please help.

Thanks

Michael

unread,
Oct 15, 2015, 6:01:06 PM10/15/15
to Barman, Backup and Recovery Manager for PostgreSQL
Hi,

I fixed the PostgreSQL: FAILED issue by modifying conninfo in barman.conf giving explicit values :

conninfo: host=<dns> user=<user_name> password=<user_password> dbname=<database_name> port=<port_id>

After running 'barman backup main' successfully, the minimum redundancy requirements: FAILED error went away. This is expected since now we have one backup for the minimum redundancy requirement which is set to 1.

Thanks

Sameer Siruguri

unread,
Oct 21, 2017, 6:27:32 PM10/21/17
to Barman, Backup and Recovery Manager for PostgreSQL
I didn't need to set the port number because my server was already running at the Postgres default but I did have to set the postgres password in the database cluster itself using ALTER ROLE, inside psql for the below to work. 
Reply all
Reply to author
Forward
0 new messages