Search Postgresql Archives

Re: Backup schema without data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Looking at the result of:

pg_dump --help

Usage:
  pg_dump [OPTION]... [DBNAME]
...
 -n, --schema=PATTERN         dump the specified schema(s) only
...
 -s, --schema-only            dump only the schema, no data
... 


So: pg_dump -s -n <schema> <db>

It works for me...


Cheers

Brent Wood


On Friday, April 7, 2023 at 12:40:58 PM GMT+12, Atul Kumar <akumar14871@xxxxxxxxx> wrote:


Hi,

Please help me in telling that how I can take the backup of one single schema without its data using pg_dump utility ?


So far, I could not find anything suitable for doing so.

Regards,
Atul


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux