Dumping a PostgreSQL database without the data is easy. Issue the below command and it will output the database table structure to a text file that can easily be imported.
pg_dump -U postgres --schema-only DBNAME -f FILENAME.sql
The above can be imported into a new database using the below syntax.
psql -U postgres DBNAME < FILENAME.sql
|
|











Entries (RSS)