database - On PostgreSQL, how to type commands? -


on postgresql, needed copy databases server another. see solutions use commands like:

pg_dump -c -h remotehost -u remoteuser dbname | psql -h localhost -u localuser dbname 

but.. need type these commands?

i not in single step ... have more control such kind of processes.

you need open terminal window , type commands.

pg_dump -c --column_inserts -u remoteuser -h remotehost > my_backup.sql  # copy file server want  # change desired parameter database name nano my_baskup.sql  createdb -u newuser -h localhost newdb_name psql -u newuser -h localhost postgres < my_backup.sql 

if copy other databases in postgresql tricky imo robust way


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -