snippetsqlMinor
How to take backup of schema postgresql?
Viewed 0 times
postgresqltakehowschemabackup
Problem
Hi I am currently using postgresql and deleting some of the tables for testing purpose and I want to take backup of schema. can any one let me know how to do that ?
Solution
You export only
or with
schema without data using pg_dump in psql [terminal]:pg_dump -U postgres -s databasename > backup.sqlor with
Pgadmin4- Go to
Tool -> Backupand selectonly schemain theDump option.
Code Snippets
pg_dump -U postgres -s databasename > backup.sqlContext
StackExchange Database Administrators Q#271130, answer score: 5
Revisions (0)
No revisions yet.