Please go to your etc/hosts file and uncomment the following line:
# more /etc/hosts
uncommented " 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4".
Also check the file pg_hba.conf on the clinet for TRUST authentication for the HOST connection & LOCAL connection while using PASSWORD authentication
eg :- pg_hba.conf
host all postgres 127.0.0.1/32 trust
host all postgres <ip of backup servernvbu> /32 trust
host all postgres <ip of clinet server > /32 trust