From: | Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: pg_dump excluding tables content but not table schema |
Date: | 2009-12-31 10:37:55 |
Message-ID: | 20091231113755.735c1f66@dawn.webthatworks.it |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mon, 28 Dec 2009 21:20:17 +0100
Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it> wrote:
> pg_dump -Fc -Z9 -s -t *.cache* -d mydb > schema_only.bak
> pg_dump -Fc -Z9 -T *.cache* -d mydb > nearly_full.bak
> cat nearly_full.bak schema_only.bak | pg_restore -1 -d mydb
> It seems it is working... I'll test if everything is there.
Unfortunately it doesn't work as expected.
It silently skip to restore the second backup (schema_only.bak).
I'm surprised it didn't output any error message, but the cache
tables aren't there.
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?
--
Ivan Sergio Borgonovo
http://www.webthatworks.it
From | Date | Subject | |
---|---|---|---|
Next Message | Dmitry Koterov | 2009-12-31 12:46:26 | Re: Visual DATA editor for PostgreSQL? |
Previous Message | neuhauser+pgsql-general#postgresql.org | 2009-12-31 09:52:20 | set-level update fails with unique constraint violation |