bash - Transfering postgreSQL DB from one server to another -
i using command effort transfer db
pg_dump -c -h localhost -u old_server_user_name site_db | psql -h new_server_ip -u postgres site_db it asks me password, give , nil happens, hangs.
what doing wrong?
first, avoid password prompt, can set environment variable pgpassword.
in terms of hanging, it's quite possible piping "eating" error otherwise see.
try breaking separate commands, like:
pg_dump -c -h localhost -u old_server_user_name site_db > db.dmp.sql && psql -h new_server_ip -u postgres -f db.dmp.sql site_db and see if errors either command.
bash postgresql ssh
No comments:
Post a Comment