DEV Community

Sandip Basnet
Sandip Basnet

Posted on

1

Migrating postgres db from CLI

Migrating postgres db within same/different server via cli.
1) Export dump from existing db: pg_dump -U postgres -h <host_address> -p 5432 <db_name> > <dump/backup_file_name>.sql
2) Import dump to new db: psql -h <new_db_host_address> -d <new_db_name> -U postgres -f <dump/backup_file_name>.sql

Note, __In both of the cases you will be prompted with password input.

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more