The process of either installing or updating PostgreSQL on a cPanel server is best performed by an expert in that particular field, such as a databse administrator for instance. However, the aforementioned process is not very long or convoluted and can be executed in a few distinct steps.
Before one begins the installation process at all, one should ensure that the data present on his or her server has been duplicated or ‘backed-up’ as a precautionary measure. This can be restored once the installation process is complete. The same rule applies in case a user wishes to update the software. One must sign in to one’s cPanel account, verify oneself as the root user using SSH and then run the given command – pg_dumpall > db.out
The following are the necessary steps that a cPanel user must follow in order to update or install PostgreSQL:
With this step the process of updating or of installing PostgreSQL stands comprehensively completed.
However, in case of an installation or updating process failing to complete, the user may revert back temporarily to his or her old PostgreSQL version. This signifies that they shall be able to restore their old directory as well. This may be accomplished by running the following commands respectively –
|service postgresql stop|
mv /var/lib/pgsql /var/lib/directory_file_name
mv /var/lib/pgsql.old /var/lib/pgsql
service postgresql restart
For further queries about the given product or process one may access the official PostgreSQL Website.