CREATE DATABASE targetdb WITH TEMPLATE sourcedb;
Showing posts with label PostgreSQL copy database. Show all posts
Showing posts with label PostgreSQL copy database. Show all posts
Wednesday, 29 August 2018
PostgreSQL copy database within the same server
Labels:
PostgreSQL copy database
Postgresql Copy database to another server
pg_dump -C -h localhost -U localuser dbname | psql -h remotehost -U remoteuser dbname
or
pg_dump -C -h remotehost -U remoteuser dbname | psql -h localhost -U localuser dbname
Labels:
PostgreSQL copy database
Subscribe to:
Posts (Atom)