Forum OpenACS Q&A: Re: database recovery: how does postgres unix work?

Collapse
Posted by Eric Wolfram on
First of all, I'm glad you think the data is recoverable. And thanks for the tips. I followed this advice. I didn't want to run any executables from the compramised system. I couldn't rpm verify the old postgres because I had installed it from a tar file and I didn't have the checksum number.

So I went to download Postgres 7.2.3. When I tried to RPM postgres, there were too many dependency errors. So I grabbed the tar file and did a gmake and gmake install. I followed the old postgres manual to install. It was all going great and I could set up a database called 'test'. Then I followed your instructions:

bash-2.05$ export PGDATA=/mnt/oldboot/usr/local/pgsql/data
bash-2.05$ pg_ctl start
postmaster successfully started
bash-2.05$ /usr/bin/postmaster does not find the database system.
Expected to find it in the PGDATA directory "/mnt/oldboot/usr/local/pgsql/data",
but unable to open file "/mnt/oldboot/usr/local/pgsql/data/global/pg_control": Permission denied

d'oh.

bash-2.05$ psql -l
List of databases
Database | Owner | Encoding
-----------+----------+-----------
template0 | postgres | SQL_ASCII
template1 | postgres | SQL_ASCII
test | postgres | SQL_ASCII
(3 rows)

My databases weren't there. Do you think the 'Permission denied' error is a permission problem or something more complicated?