pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedRestoring database question, part 2..
3+ messages / 3 participants
[nested] [flat]
* Restoring database question, part 2..
@ 2006-08-15 15:25 arsi@aranzo.netg.se
0 siblings, 1 reply; 3+ messages in thread
From: arsi@aranzo.netg.se @ 2006-08-15 15:25 UTC (permalink / raw)
To: pgsql-admin
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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Restoring database question, part 2..
@ 2006-08-15 21:31 Jim C. Nasby <jnasby@pervasive.com>
parent: arsi@aranzo.netg.se
0 siblings, 1 reply; 3+ messages in thread
From: Jim C. Nasby @ 2006-08-15 21:31 UTC (permalink / raw)
To: arsi@aranzo.netg.se; +Cc: pgsql-admin
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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Restoring database question, part 2..
@ 2006-08-16 15:53 Jim Nasby <jnasby@pervasive.com>
parent: Jim C. Nasby <jnasby@pervasive.com>
0 siblings, 0 replies; 3+ messages in thread
From: Jim Nasby @ 2006-08-16 15:53 UTC (permalink / raw)
To: arsi@aranzo.netg.se; pgsql-admin
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..
Hi there,
one question to your response, are all the tables (especially the pg_*
ones) located under the data/base folder for each database??
I will try your suggestion. I am switching between my "not working"
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
>> <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
>
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2006-08-16 15:53 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-08-15 15:25 Restoring database question, part 2.. arsi@aranzo.netg.se
2006-08-15 21:31 ` Jim C. Nasby <jnasby@pervasive.com>
2006-08-16 15:53 ` Jim Nasby <jnasby@pervasive.com>
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