Skip to main content

Dump database to .sql

1. Preparation

Start proxy:

ssh -L 15432:localhost:5432 deploy@16.171.240.56

2. Dump

Find Private Connection URI on your database in Hatchbox GUI:GUI. Copy username, password and database into your local terminal and run:

pg_dump postgres:postgresql://<connection-uriusername>:<password>@localhost:15432/<database> --no-owner > dump.sql

3. Cleanup

Remove database dump and close database proxy started in step 1.

rm dump.sql