Figo
Figo

Reputation: 11

postgresql db structure script

How to get my db structure without the data, (schema, tables, ...) as a script by command line.

Upvotes: 1

Views: 1320

Answers (1)

DrColossos
DrColossos

Reputation: 12998

http://www.postgresql.org/docs/current/interactive/app-pgdump.html

pg_dump -s -U username database > backup.sql

Haven't tested it though, so not sure if it works.

edit: had the german link up there ;)

Upvotes: 4

Related Questions