Skip to content
masterclass Buddy

PostgreSQL · Command

pg_dump

pg_dump exports one PostgreSQL database to SQL or an archive. It makes a consistent snapshot while normal reads and writes continue.

Last updated

Syntax

pg_dump [ connection-option ...] [ option ...] [ dbname ]

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • pg_restore
  • pg_dumpall
  • psql
  • createdb

Source: PostgreSQL: Documentation: 18: pg_dump. Checked 2026-11-03.