DEV Community

Agik Setiawan
Agik Setiawan

Posted on

Dump and Restore Postgesql

Dump

pg_dump POSTGRESQL_URL > my_db.sql
Enter fullscreen mode Exit fullscreen mode

Restore

psql -h HOST_DB -U USERNAME existing_db < my_db.sql
Enter fullscreen mode Exit fullscreen mode

Top comments (0)