How to take backup of schema postgresql?
You export only schema without data using pg_dump in psql [terminal]:
pg_dump -U postgres -s databasename &gt; backup.sql

or with Pgadmin4

Go to Tool -&gt; Backup and select only schema in the Dump option.