Re: Pg backup

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

 



On Wed, 2022-10-12 at 16:29 +0530, Nikhil Ingale wrote:
> How do I take the backup of all the tables (no table data, no functions and other objects) only from one schema and restore to another schema?

Perform a dump with

 pg_dump --schema=yourschema --schema-only dbname

Create a new database, restore the dump into the new database, rename the schema there,
dump the new database and drop it, then import the new dump into the original database.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com





[Index of Archives]     [Postgresql Home]     [Postgresql General]     [Postgresql Performance]     [Postgresql PHP]     [Postgresql Jobs]     [PHP Users]     [PHP Databases]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Forum]

  Powered by Linux