I have some experience with different versions of Postgres, but I'm just
getting around to using pg_restore, and it's not working for me at all.

I can connect with psql, and pg_dump works, but pg_restore never does
anything when I call it.  It never even prompts for a password.

Here is my pg_hba.conf:
# "local" is for Unix domain socket connections only
local   all             all                                     ident
map=super
# IPv4 local connections:
host    all             all             0.0.0.0/0               md5
# IPv6 local connections:
host    all             all             ::1/128                 ident
# Allow replication connections from localhost, by a user with the
# replication privilege.
local   replication     all                                     peer
host    replication     all             127.0.0.1/32            ident
host    replication     all             ::1/128                 ident

And my pg_ident.conf
# MAPNAME       SYSTEM-USERNAME         PG-USERNAME
super           ec2-user                postgres

I can connect with psql either of these two ways:
psql -U postgres
or
psql -h ip-172-31-62-127.ec2.internal -p 5432 -U postgres -W postgres
(Yes, it's an AWS server)

This pg_dump command works:
pg_dump -U postgres -f predata.sql -F p -v  -d prod_data

But a matching pg_restore command does nothing.
pg_restore -U postgres -f predata.sql -v

I'm running 10.6.

thank you

Reply via email to