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
Post a Comment