Backup of PostgreSQL database design - no data
P粉098417223
2023-08-24 14:29:36
<p>I'm trying to find a way to back up my database design without including the data stored in the database. In fact, one might say I want a file containing all "CREATE Scripts" in the database. Ideally, this file can be used to recreate the database (without the data of course). </p>
<p>How to avoid data in database backup? </p>
<p>I'm using pgAdmin 4.1.3 and PostgreSQL 9.6. </p>
You can use it from psql (terminal):
According to the pg_dump documentation, "-s" only dumps the object definition (schema), not the data.
pg_dump documentation