Thanks Adrian. I've got postgres 9.4 running on a second RHEL 6.5 machine. This is the machine I want to restore the pg_dump to.
Last week, I ran this command on the main PG 9.4 db server:
./pg_dump -t RECORDER -Fc postgres -Z0 | xz -9 > /tmp/dump_xz
The -Z0 turns off compression. So I used xz and noticed the file was not that big.
Now, I got PG 9.4 running today on a 2nd machine. I just did the initdb, started service, updated the hba.conf and postgres.conf to accept connections from the outside and then restarted service.
1) When i attempt to restore the archived, I get an error to provide password and I am confused what to do here.
2) is it correct to do xzcat and then pipe that to pgsl? I want to restore on
mymachine.com
3) on the target machine, I ran initdb and by default it creates postgres. Will that be a problem when restoring?
On this machine I am connected as root.
xzcat dump_xz |/opt/PostgreSQL/9.4/bin/psql -h
mymachine.com postgres
Password:
Thank you!