PostgreSQL Installation or Upgrade and restore previous version in cpanel

Cpanel hosting Solution Dedicated Server Solution

PostgreSQL Installation or Upgrade

If you wish the installation, upgrade, and configuration of the PostgreSQL on your server, then follow the given steps.

  1. Use /usr/local/cpanel/scripts/installpostgres commandTh

This command upgrades or installs PostgreSQL.

  1. ConfigurePostgreSQL interface of WHM must be accessed through WHM >> Home >> SQL Services >> Configure PostgreSQL
  2. In case PostgreSQL does not exist on the server, the user will have the option to select Install Config while in case PostgreSQL exists on your server, this process replaces the authentication file for configuration.
  3. Add existing cPanel users to PostgreSQL by employing the Create Users option.
  4. In the Enter New Password box, input a new password. Make sure to avoid non-alphanumeric characters and symbols to bypass errors.
  5. Select Change Password after confirmation of a new password.
  6. Use psql -U postgres dbname < dumpfile.sql command to restore your data directories.

How to Restore a Previous PostgreSQL Version Successfully?

Users will revert to their previous version of PostgreSQL if the new installation procedure fails. Thus, previous PostgreSQL databases can be restored. The following commands are used.

  • service postgresql stop
  • mv/var/lib/pgsql/var/lib/directory_file_name
  • mv /var/lib/pgsql.old /var/lib/pgsql
  • service postgresql restart

1 thought on “PostgreSQL Installation or Upgrade and restore previous version in cpanel

  1. Thanks , I’ve recently been looking for information approximately this topic for
    a while and yours is the best I have discovered till now.
    But, what in regards to the conclusion? Are you positive about the source?

Leave a Reply

Your email address will not be published. Required fields are marked *