Use /scripts/installpostgres without losing data
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
-
In order to fix an issue with phpPgAdmin not properly recognizing databases, I have been able to run /scripts/installpostgres --force
Hello, Have you tried resolving the issue without running that command? What's the specific issue you are encountering regarding the recognition of databases? Thank you.0 -
It looks like just running this directly also fixes it: /usr/local/cpanel/bin/updatephppgadmin --force Doing this prevents me from having to run installpostgres (which was resetting the password and making my formerly-created full backup not able to restore data). 0
Please sign in to leave a comment.
Comments
4 comments