pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedpaertially restoring a DB
2+ messages / 2 participants
[nested] [flat]
* paertially restoring a DB
@ 2004-10-29 14:04 Niall Linden <nialllinden@yahoo.com>
2004-11-01 05:51 ` Re: paertially restoring a DB Iain <iain@mst.co.jp>
0 siblings, 1 reply; 2+ messages in thread
From: nialllinden@yahoo.com @ 2004-10-29 14:04 UTC (permalink / raw)
To: pgsql-sql
i am having a problem with dump and restore. basically i have 2
databases
maindb and tempdb
the databases are almost the same but the main db has some extra
tables which dont change. what i need to do is get all the information
form the temp db and put it in the main db. the tempdb should
overwrite all the data in the main db, but the tables that exist in
the maindb only should remain
ie
maindb has tables: dbsettings, data1, data2
tempdb has tables: data1, data2
then the tables (and data) data1,2 from tempdb should overwrite their
corresponding tables but dbsettings should remain unchanged in maindb.
any things ive tried overwrite all the tables and i loose dbsettings
table completely (not good)
any help appreciated
Niall
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: paertially restoring a DB
2004-10-29 14:04 paertially restoring a DB Niall Linden <nialllinden@yahoo.com>
@ 2004-11-01 05:51 ` Iain <iain@mst.co.jp>
0 siblings, 0 replies; 2+ messages in thread
From: Iain @ 2004-11-01 05:51 UTC (permalink / raw)
To: Niall Linden <nialllinden@yahoo.com>; pgsql-sql
Hi,
What you are trying to do should be possible as far as I know.
Did you use the custom format for your dump (pg_dump -Fc)? Try extracting a
list of contents of the dump (pg_restore --list) option and check that for
anything that might be causing you to lose that table. Comment out any
offending lines and restore using the --use-list option.
If you used the custom format you have a lot of options for extracting
individual table data and stuff like that.
Good luck,
Iain
----- Original Message -----
From: "Niall Linden" <nialllinden@yahoo.com>
To: <pgsql-sql@postgresql.org>
Sent: Friday, October 29, 2004 11:04 PM
Subject: [SQL] paertially restoring a DB
>i am having a problem with dump and restore. basically i have 2
> databases
>
> maindb and tempdb
>
> the databases are almost the same but the main db has some extra
> tables which dont change. what i need to do is get all the information
> form the temp db and put it in the main db. the tempdb should
> overwrite all the data in the main db, but the tables that exist in
> the maindb only should remain
>
> ie
> maindb has tables: dbsettings, data1, data2
> tempdb has tables: data1, data2
>
> then the tables (and data) data1,2 from tempdb should overwrite their
> corresponding tables but dbsettings should remain unchanged in maindb.
>
> any things ive tried overwrite all the tables and i loose dbsettings
> table completely (not good)
>
> any help appreciated
>
> Niall
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2004-11-01 05:51 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-10-29 14:04 paertially restoring a DB Niall Linden <nialllinden@yahoo.com>
2004-11-01 05:51 ` Iain <iain@mst.co.jp>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox