X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id A5E499FB33F for ; Wed, 16 Aug 2006 14:25:54 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 59375-06 for ; Wed, 16 Aug 2006 17:25:40 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from ausimss.pervasive.com (ausimss.pervasive.com [66.45.103.246]) by postgresql.org (Postfix) with ESMTP id 849779FB334 for ; Wed, 16 Aug 2006 14:25:38 -0300 (ADT) Received: from ausbayes2.aus.pervasive.com ([172.16.8.6]) by ausimss.pervasive.com with InterScan Messaging Security Suite; Wed, 16 Aug 2006 10:55:13 -0500 Received: from AUSOWA.aus.pervasive.com ([172.16.4.8]) by ausbayes2.aus.pervasive.com with Microsoft SMTPSVC(5.0.2195.6713); Wed, 16 Aug 2006 10:55:12 -0500 Received: from ausmailid.aus.pervasive.com ([172.16.4.64]) by AUSOWA.aus.pervasive.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 16 Aug 2006 10:54:02 -0500 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: Re: Restoring database question, part 2.. Date: Wed, 16 Aug 2006 10:53:30 -0500 Message-ID: <4D27CB1096EF1C408F4BFAB0046EC7B667D930@ausmailid.aus.pervasive.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [ADMIN] Restoring database question, part 2.. Thread-Index: AcbBQrdRYjiTU/5LRtWLgGH1z+LucAACWdlZ References: <20060815213108.GM21363@pervasive.com> From: "Jim Nasby" To: , X-OriginalArrivalTime: 16 Aug 2006 15:54:02.0052 (UTC) FILETIME=[319A7840:01C6C14C] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200608/187 X-Sequence-Number: 22730 Please cc the list so others can help. Yes, those tables are per-database. -- Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461 -----Original Message----- From: arsi@aranzo.netg.se [mailto:arsi@aranzo.netg.se] Sent: Wed 8/16/2006 8:42 AM To: Jim Nasby Subject: Re: [ADMIN] Restoring database question, part 2.. =20 Hi there, one question to your response, are all the tables (especially the pg_*=20 ones) located under the data/base folder for each database?? I will try your suggestion. I am switching between my "not working"=20 database and the one that was installed when I had to reinstall my = Linux. Thanks for the answer, Archie > On Tue, Aug 15, 2006 at 05:25:38PM +0200, arsi@aranzo.netg.se wrote: >> >> Hi all, >> >> this is a follow question to my other question about moving the data >> folder (that holds all databases) as a method to restore the = databases >> after my server was hacked and everything removed. >> >> After having read the manual, recieved some helpfuls responses I have >> carefully stopped the database, moved the newly installed data folder >> (under /var/lib/postgres) and copied over the old (before the hacking >> attempt) data folder. >> >> The database starts and I can select from the tables but I can't do = \d >> or dump the database. The error message is as follows: >> >> ERROR: could not open relation "pg_inherits": No such file or = directory >> >> >> From what I can read about the pg_inherits (and other pg_* tables) is = that >> it is a table that contains info about the tables in my database. = What I >> can't find is where these should be located. > > It sounds like you didn't get all the tables. If you do a SELECT > relfilenode FROM pg_class WHERE relname=3D'pg_inherits' on another 7.4 > database (I don't have one handy), you'll see what the filename should > be so you can look for it. > > If you haven't done many DDL changes since the last backup, you could > possibly restore an old copy and use that info to reconstruct > pg_inherits. > --=20 > Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com > Pervasive Software http://pervasive.com work: 512-231-6117 > vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461 >