Reputation: 76968
I have a very big PostgresSQL database. I would like to dump the schema only. Running
pg_dump -s myschema -f /dump.sql
runs forever, so I suppose it is exporting the data as well. How can I dump the schema only?
Upvotes: 1
Views: 5532
Reputation:
-s
takes no parameter, you need to use -n
or --schema
to select the schema you want to dump:
pg_dump -s -n myschema -d mydatabase -f /dump.sql
Upvotes: 6