Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Automated postgreSQL backups?

Discussion in 'Data Protection' started by bruno schneider, May 29, 2019.

  1. bruno schneider

    bruno schneider Registered

    Joined:
    May 29, 2019
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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
     
  2. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,476
    Likes Received:
    507
    Trophy Points:
    263
    Location:
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice