I'm trying to use the answer here to allow me to transfer my PostgreSQL dbs from an old server (sourcepc) to a new server (receiverpc) on a completely different network. I am therefore on sourcepc trying to push the db dump to receiverpc using the following command:
pg_dump -C -h localhost -U dbuser dbname | psql -h receiverpc_ipaddress -U dbuser dbname
This isn't working - it just sits there after the dbuser password is given. I am running Ubuntu (9.10 on sourcepc, and 14.04 on receiverpc). PostgreSQL is 8.4 on sourcepc and 9.3 on receiverpc.
What I've done:
Opened the firewall on receiverpc to allow access to the PostgreSQL port.
Edited /etc/postgresql/9.3/main/postgresql.conf on receiverpc to let it receive external addresses:
listen_addresses = '*'
Edited /etc/postgresql/9.3/main/pg_hba.conf on receiverpc to add an entry for sourcepc:
host all all sourcepc_ipaddress/32 md5
- Restarted PostgreSQL.
I can't really understand why it's not working.