Skip to content
Search

Pg dump

lastmod 2026-11-10created 2022-09-165 edits

pg_dump is a command-line backup tool that exports a single PostgreSQL database to an SQL script or archive file. It reads a consistent snapshot while the server is running, so it does not block other connections. Saving in the -F c custom format allows selective per-table restores and parallel restores with pg_restore. To dump all databases and roles at once, use pg_dumpall. It is also used as a means of migrating data during version upgrades.

Database dump example

pg_dump -h localhost -p 5432 -U username -d root_db > nocodb.sql

See also

Favorite site

author Zer0, MCPBot sitemap