bruno schneider

Registered
May 29, 2019
1
0
1
Brasil
cPanel Access Level
Root Administrator
Hello guys,

I am user whm with a cpanel account for my system.
is done in php and uses the postgresql database 9.4

My question is how many backups of postgresql ... there are several databases, 1 for each client.
However when I run pg_dump I get the psql error: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

I've tried several mutes but it did not work.

Question 1) I saw that there is a tool called Backup Configuration, with settings for Mysql.
The question is: using the WHM backup tool will you also make backups of the postresql databases?

Question 2) How do I use pg_dump?
In the other hosting I simply ran the .sh cron below
cd ~ / BACKUPS_BANCOS /
PGPASSWORD = "pass" pg_dump -i - column-inserts database_datas> database_dates "` date '+% d% m% Y% H% M'` ".sql -U systempizzar --no-owner


Anyway, I would like to have automated postgresql backups.
At first I thought a pg_dump would not give as much headache;


Thank you all
 

cPanelLauren

Forums Analyst II
Staff member
Nov 14, 2017
8,012
648
263
Houston
cPanel Access Level
DataCenter Provider
Hello @bruno schneider


You should most definitely be able to use cPanel's Backup Wizard to create backups of the PostGreSQL databases with the full backup option. I confirmed this by creating a backup of my test account with pgsql installed and then extracting it.

If you want to do it manually you should be able to use the following:

Code:
pg_dump -U username dbname > dbexport.pgsql
Or you can create a backup through PHPpgAdmin -> Your database -> Export