pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jim C. Nasby <jnasby@pervasive.com>
To: arsi@aranzo.netg.se
Cc: pgsql-admin@postgresql.org
Subject: Re: Restoring database question, part 2..
Date: Tue, 15 Aug 2006 16:31:08 -0500
Message-ID: <20060815213108.GM21363@pervasive.com> (raw)
In-Reply-To: <Pine.LNX.4.62.0608151712420.11395@aranzo.netg.se>
References: <Pine.LNX.4.62.0608121331510.473@aranzo.netg.se>
	<Pine.LNX.4.62.0608121958150.948@aranzo.netg.se>
	<Pine.LNX.4.62.0608151712420.11395@aranzo.netg.se>

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 
> <table> 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



view thread (3+ messages)  latest in thread

Message-ID: <20060815213108.GM21363@pervasive.com>
Permalink:  ../20060815213108.GM21363@pervasive.com/
Also on:    postgresql.org/message-id/20060815213108.GM21363@pervasive.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: jnasby@pervasive.com, arsi@aranzo.netg.se
  Subject: Re: Restoring database question, part 2..
  In-Reply-To: <20060815213108.GM21363@pervasive.com>
  References: <Pine.LNX.4.62.0608121331510.473@aranzo.netg.se> <Pine.LNX.4.62.0608121958150.948@aranzo.netg.se> <Pine.LNX.4.62.0608151712420.11395@aranzo.netg.se> <20060815213108.GM21363@pervasive.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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