Symptoms
After installing PostgreSQL to the server using the cPanel install script, then next time cpbackup runs, the backups do not include PostgreSQL databases.
Description
When PostgreSQL is installed using the install script found in the documentation, the Cpanel backup does not automatically include PostgreSQL in the backup configuration.
command : grep -i psqlbackup /var/cpanel/backups/config Result : PSQLBACKUP: 'no'
Due to user reports, an internal case has been opened. For reference, the case number is CPANEL-30147. Follow this article to receive an email notification when a solution is published in the product.
Workaround
The backup configuration would need to be updated through the command line. You can do this by running the following command. This command will enable backups for PostgreSQL and make a backup of the original configuration:
sed -i.org "s/PSQLBACKUP: 'no'/PSQLBACKUP: 'yes'/g" /var/cpanel/backups/config
[Jetbackup] dumping PostgreSQL may fail – FATAL: no pg_hba.conf entry for host “::1”
Symptoms
In some cases, Jetbackup might fail to backup PostgreSQL databases with the following error:
"[ERROR] Failed exporting database data. Database Handler Error:
Failed export PostgreSQL database "cptechs_testing". Error: pg_dump: [archiver (db)] connection to database "cptechs_testing" failed:
FATAL: no pg_hba.conf entry for host "::1", user "postgres", database "cptechs_testing", SSL off"
Description
Jetbackup is currently reviewing an issue in which certain modifications to the PostgreSQL configuration file are preventing the successful dump of databases. This seems to be due to the “samerole” database flag for IPv6 ::1 entry in the configuration file: /var/lib/pgsql/data/pg_hba.conf
We will monitor this further and will update this article when a resolution is implemented.
Workaround
Edit the file /var/lib/pgsql/data/pg_hba.conf and add the following value to the bottom of the file:
host all all ::1/128 md5
When this is added to the configuration file, use the following commands to restart the PostgreSQL service, and then the Jetbackup service.
service postgresql restart
service jetbackup5d restart
