pg_dump July 29, 2021 pg_dump -h localhost -p 5432 -U postgres -d db > dump.sql dumps the entire db database on localhost to dump.sql.