11-18-2019, 02:15 PM
The postgres commands to dump a database are:
pg_dump -U <user> <database> > database.sql
To restore this, you can use:
psql -U <user> <database> < database.sql
To dump and restore all of your databases you would use pg_dumpall
pg_dump -U <user> <database> > database.sql
To restore this, you can use:
psql -U <user> <database> < database.sql
To dump and restore all of your databases you would use pg_dumpall