Dump a database
pg_dump -h db.url.com -d databasename -u user -cC > dump.sql
Explation
-cwill drop all existing data before restoring the dumped data-Cwill include database creation- will drop the whole database instead of all tables when used together with
-c
- will drop the whole database instead of all tables when used together with