From: | Dimitri Fontaine <dfontaine(at)hi-media(dot)com> |
---|---|
To: | Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: pg_dump excluding tables content but not table schema |
Date: | 2010-01-02 10:44:42 |
Message-ID: | m2skaoyeed.fsf@hi-media.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it> writes:
> It seems that you have to actually restore the 2 backup separately.
>
> pg_restore -1 -d mydb < nearly_full.bak
> pg_restore -1 -d mydb < schema_only.bak
>
> I can't think of any other way to restore both in one transaction
> unless I backup in plain text. But that should have other drawback.
>
> Any hint?
In general what I do is backup it all then filter at restore time,
editing the restore catalog (see pg_restore options -l and
-L).
Incidentally I've written code for automating this for me, that's called
pg_staging and is available at github and already is in debian (I miss a
source release so that RPM will follow):
http://github.com/dimitri/pg_staging
Regards,
--
dim
From | Date | Subject | |
---|---|---|---|
Next Message | Andrus | 2010-01-02 16:40:11 | Using autogenerated primary key in transaction |
Previous Message | Dimitri Fontaine | 2010-01-02 10:41:01 | Re: Visual DATA editor for PostgreSQL? |