In order to fix an issue with phpPgAdmin not properly recognizing databases, I have been able to run /scripts/installpostgres --force, however, this process removes the data from all the databases and they have to be manually restored. Is there a way to backup/restore them all at once or to prevent that data loss to begin with?
It's a CentOS system with postgres (PostgreSQL) 8.4.20
I tried something like the following:
Switch to the postgres user and run pg_dumpall -f fullpsqlbackup
Switch to root user and stop postgres then move the existing /var/lib/pgsql database out of the way.
setup a new pgsql directory with proper permissions and run /scripts/installpostgres --force
Run service postgresql initdb
Fix postgres
Switch to postgres user and run cat /var/lib/pgsql.bak/fullpsqlbak | psql then go back to root and run fixpostgres once more.
Unfortunately I don't know a whole lot about Postgres and this may not be the best way to go about it. If someone could provide some insight, it'd be much appreciated.
Thanks
It's a CentOS system with postgres (PostgreSQL) 8.4.20
I tried something like the following:
Switch to the postgres user and run pg_dumpall -f fullpsqlbackup
Switch to root user and stop postgres then move the existing /var/lib/pgsql database out of the way.
setup a new pgsql directory with proper permissions and run /scripts/installpostgres --force
Run service postgresql initdb
Fix postgres
Switch to postgres user and run cat /var/lib/pgsql.bak/fullpsqlbak | psql then go back to root and run fixpostgres once more.
Unfortunately I don't know a whole lot about Postgres and this may not be the best way to go about it. If someone could provide some insight, it'd be much appreciated.
Thanks