Search Postgresql Archives

Leaving out a schema from the dump/restore

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

 



Hi,

I have a database with a lot of schemas; now one schema has been added, re-integrating a former separate database (of course, there are good reasons to do so). This "new" schema contains very much data which is rarely changed; thus, it would be sufficient to save it much less often than the rest of the database (e.g. once a month).

So what I'd like to do is do the daily dump with this schema (i.e. its data) dropped.

I read the "Disabling and enabling constraints and triggers to make pg_restore work" thread (http://groups.google.de/group/pgsql.general/browse_thread/thread/83cc7097eb765220); yes, I can use the database superuser account.

So, are there any contraindications to do create a working backup like so:

 - dump the schemas
 - "update pg_catalog.pg_class set relchecks=0;"
 - dump all the data minus the one schema to be left out
 - "update pg_catalog.pg_class set relchecks=1;"

The data of the missing schema would be restored separately; I'd have to support this with scripts both for Linux and Windows.
-- 
Tia,

Tobias


[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 Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux