Admin and tuningPostgreSQL
pg_dump
pg_dump
pg_restore
Create logical backups and restore them to target instances.
Command
pg_dump -Fc -f backup.dump -d
Example usage
Produce custom-format dumps and restore them with cleanup.
pg_dump -Fc -f backup.dump -d <database>
pg_restore -d <database> --clean --create backup.dump
Related tags
Admin and tuningpg_restoredatabasesqlpsql