Forum OpenACS Q&A: Database Problems

Request notifications

Posted by Vince T on
Hello All,

I have a potentially huge headache on an old (4.6) openacs install I have. It had been running fine for over a year.

Today I was called because the services had stopped. They rebooted the server.

I logged in and tried to restart aolserver/openacs... got the standard welcome screen you get when you first install openacs, just before it creates the datamodel.

I figure it is a database problem so I stop aolserver and ssh in but find only six tables! after a \dt using psql

List of relations
Name | Type | Owner
acs_mail_links | table |
acs_objects | table |
composition_rels | table |
membership_rels | table |
spam_messages | table |
users | table |
(6 rows)

These tables have lots of old data. I just don't know what happened to all the other tables.

To make matters worse, there is no current backup. I am afraid to do anything that might make me lose more info.

Where do I start? Is there a way to find and recover data on the postgresql file system structure?

Help please!


2: Re: Database Problems (response to 1)
Posted by Vince T on
Looking further,

it seems that the data is still all there...

when i select certain tables, their contents appear, but they are not in the \dt list. (this is using psql)

im currently trying to dump the database before i go further, but it wont let me with the error:

pg_dump: missing pg_database entry for this database

i am proceeding very carefully so any advice would be greatly appreciated.

tia, vincent

3: Re: Database Problems (response to 1)
Posted by Tom DB on
I experience the same problem - did you find a solution to it?

plz mail me at tomdb at uk2 dot net

4: Re: Database Problems (response to 1)
Posted by Iuri Sampaio on
first, make a copy of your ~/pgsql/data, or wherever you know your db is located.

have you used pgadmin?

you could try to open your db through pgadmin via tunnelling ssh.
i'm afraid you would get just the few tables you have on pgsql, those you mentioned.

at least try it out and if get in you can visualized the whole data and even save a copy.

ask on the postgresql users list

best hopes