X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id CE5FB9FB28C for ; Tue, 15 Aug 2006 18:31:26 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 69743-04 for ; Tue, 15 Aug 2006 18:31:11 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id A6D809FB274 for ; Tue, 15 Aug 2006 18:31:11 -0300 (ADT) Received: by noel.decibel.org (Postfix, from userid 1001) id 80BB45644C; Tue, 15 Aug 2006 16:31:09 -0500 (CDT) Received: (hashcash-sendmail, from uid 1001); Tue, 15 Aug 2006 16:31:08 -0500 Date: Tue, 15 Aug 2006 16:31:08 -0500 From: "Jim C. Nasby" To: arsi@aranzo.netg.se Cc: pgsql-admin@postgresql.org Subject: Re: Restoring database question, part 2.. Message-ID: <20060815213108.GM21363@pervasive.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD 6.0-RELEASE-p4 amd64 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.11 X-Hashcash: 1:20:060815:arsi@aranzo.netg.se::+EL84TStGfZCZZwI:000000000000000000 0000000000000000000000006aaQ X-Hashcash: 1:20:060815:pgsql-admin@postgresql.org::CnwULkOxYdwJeMot:00000000000 0000000000000000000000000/tP X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.106 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200608/174 X-Sequence-Number: 22717 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='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. -- 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