pg_dump
Verified for current stable LTS
Pg Dump Command: Dump Only Schema Into Sql Script
Use for dump only schema into sql script with Pg Dump. Exact CLI syntax to dump only schema into sql script using Pg Dump.
When to use this: Use for dump only schema into sql script with Pg Dump.
Command Syntax
pg_dump -s <db_name> > <path/to/output_file.sql> pg_dump -s <db_name> > <path/to/output_file.sql> Live Command Builder
Final Command
pg_dump -s <db_name> > <path/to/output_file.sql> Command Breakdown
-s- Command Option
- Tool-specific option used by this command invocation.
FAQ
Purpose: Exact syntax to dump only schema into sql script using Pg Dump.
Test path: Replace placeholders and run destructive commands in a disposable workspace first.
Flag behavior: Tool version, platform, and shell can change behavior.
Improve This Command
Suggest a correction, safer default, or version-specific note for this entry.
Related Operations
Pg Dump Command: Dump Database Custom Format With Output
pg_dump -F c <db_name> > <output_file.dump> Pg Dump Command: Dump Database Custom Host Port pg_dump -h <host> -p <port> <db_name> > <output_file.sql> Pg Dump Command: Dump Database Custom Host Port With Output pg_dump -h <host> -p <port> <db_name> > <output_file.sql> Pg Dump Command: Dump Database Custom Username pg_dump -U <username> <db_name> > <output_file.sql> Pg Dump Command: Dump Database Custom Username With Output pg_dump -U <username> <db_name> > <output_file.sql>