CmdID

CmdID / Commands

pg_dump

Extract a PostgreSQL database into a script file or other archive file. tldr-pages

On several platforms

Opens CmdID with your command. It is read in your browser and sent nowhere.

Several platforms

from tldr-pages, CC BY 4.0

Dump database into an SQL-script file

pg_dump db_name >output_file.sqlIdentify

Dump a database into an SQL-script file, using a specific username

pg_dump --username username db_name >output_file.sqlIdentify

Dump a database into an SQL-script file, using a specific host and port

pg_dump --host host --port port db_name >output_file.sqlIdentify

Dump a database into a custom-format archive file

pg_dump --format [c db_name >output_file.dumpIdentify

Dump only database data into an SQL-script file

pg_dump --data-only db_name >path/to/output_file.sqlIdentify

Dump only schema (data definitions) into an SQL-script file

pg_dump --schema-only db_name >path/to/output_file.sqlIdentify