X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 698073A4423 for ; Mon, 1 Nov 2004 05:56:07 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 07852-01 for ; Mon, 1 Nov 2004 05:56:05 +0000 (GMT) Received: from millenium.mst.co.jp (unknown [210.230.185.241]) by svr1.postgresql.org (Postfix) with ESMTP id 6B84D3A4413 for ; Mon, 1 Nov 2004 05:56:05 +0000 (GMT) Received: from mst1x5r347kymb (lc12114 [192.168.1.114]) by millenium.mst.co.jp (8.11.6p2/3.7W) with SMTP id iA15p1Z12421; Mon, 1 Nov 2004 14:51:01 +0900 Message-ID: <003301c4bfd6$da851d80$7201a8c0@mst1x5r347kymb> From: "Iain" To: "Niall Linden" , References: <52684575.0410290604.5f906666@posting.google.com> Subject: Re: paertially restoring a DB Date: Mon, 1 Nov 2004 14:51:33 +0900 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="ISO-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200411/2 X-Sequence-Number: 19321 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" To: 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