The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Cron job of Backup Configuration

Discussion in 'Data Protection' started by Abdelmks, Mar 16, 2017.

  1. Abdelmks

    Abdelmks Active Member

    Joined:
    Aug 4, 2016
    Messages:
    30
    Likes Received:
    2
    Trophy Points:
    8
    Location:
    Morocco
    cPanel Access Level:
    Root Administrator
    Hello,
    I want to know if I can configure a cron job of editing backup configuration
    for example I will configure backup weekly for all my databases of all users, and after that change this configuration to do backups of all users (with data) monthly.
    so this change of configuration backup will done automatically with my cron job.
    is this possible ?
    Thank you
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    15,618
    Likes Received:
    296
    Trophy Points:
    433
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    You can configure cPanel Backup cron time here:
    WebHost Manager »Server Configuration »Configure cPanel Cron Jobs
    Doing separate backups of just databases at one time and files at another is not possible though.
     
  3. Abdelmks

    Abdelmks Active Member

    Joined:
    Aug 4, 2016
    Messages:
    30
    Likes Received:
    2
    Trophy Points:
    8
    Location:
    Morocco
    cPanel Access Level:
    Root Administrator
    so I cannot modify backup configuration automatically ?
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,287
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello @Abdelmks,

    If I understand correctly, you'd like to manually modify the backup configuration files via a cron job in order to use different backup configuration values at different times of the month/day. The configuration file for local backups is located at:

    Code:
    /var/cpanel/backups/config
    Ensure to remove the config.cache file after making changes to this file. Regarding backup user selection, this is stored in the cPanel user file for each user. EX:

    Code:
    grep BACKUP /var/cpanel/users/example
    BACKUP=1
    
    "1" is enabled, and "0" is disabled. Run the following command after making changes to these files:

    Code:
    /scripts/updateuserdomains
    Thank you.
     
Loading...

Share This Page