pg_dump -U app -d appdb -Fc -f appdb.dump

Category: Databases & SQL

pg_dump -U app -d appdb -Fc -f appdb.dump

Back up a database in custom format

-Fc writes the compressed custom format, which supports selective restore and parallel restore, unlike plain SQL dumps. -f names the output file. Restore with pg_restore; the dump is not readable as text.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.