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

Posted by Eric Wolfram on
Okay, you're right you're right. I had another version going. After messing with the env .bash_profile and .bachrc files for awhile, with no progress, I decided to use RPM -e postgresql -- of course I had to do that to about 4 or 5 things, like postres-server and postgres-lib stuff -- but eventually it was all off. Then I did a gmake install again and recreated the postgres user and deleted the /usr/local/pgsql/data director and restarted the server...after a few things with changing permissions with the lockfiles...LAAAAAAAAA...I can see the old databases!!!!

[postgres@rhumba pgsql]$ export PGDATA=/tmp/data_bak/data
[postgres@rhumba pgsql]$ pg_ctl start
postmaster successfully started
[postgres@rhumba pgsql]$ DEBUG: database system is ready

[postgres@rhumba pgsql]$ psql -l
List of databases
Name | Owner
birdnotes | postgres
film | postgres
mytlc | postgres
new | postgres
roxbox | postgres
scanster | postgres
template0 | postgres
template1 | postgres
test | postgres
(9 rows)

I'm all ready to try a pg_dump and I'm wondering what options to use. One post in this forum says something like:

pg_dump -Ft -b mytlc > mytlc.tar

or would a simple think work like:

pg_dump mytlc mytlc.dump