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!

2 backup crons - necessary?

Discussion in 'Data Protection' started by sahostking, Nov 15, 2013.

  1. sahostking

    sahostking Well-Known Member

    Joined:
    May 15, 2012
    Messages:
    330
    Likes Received:
    3
    Trophy Points:
    68
    Location:
    Cape Town, South Africa
    cPanel Access Level:
    Root Administrator
    Hi guys,

    Been reviewing our servers today and 2 of them seem to have the following crons:

    0 2 * * * /usr/local/cpanel/bin/backup

    and

    0 1 * * * /usr/local/cpanel/scripts/cpbackup


    Is this a duplication?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,803
    Likes Received:
    1,898
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello :)

    The "/usr/local/cpanel/bin/backup" script is for the new backup system and the "/usr/local/cpanel/scripts/cpbackup" script is for the legacy backup system. You are welcome to delete the legacy backup script cron job if you do not use legacy backups. Note that both existing backup scripts running on a cron job will not cause additional load. The backup scripts only generate actual backup archives when backups are enabled.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. XenomediaBV

    XenomediaBV Well-Known Member

    Joined:
    Sep 3, 2009
    Messages:
    60
    Likes Received:
    0
    Trophy Points:
    56
    Location:
    The Netherlands
    cPanel Access Level:
    Root Administrator
    @cPanelMichael. Actually not entirely true. Due to the crontab legacy entry there is actually a pid stored in "/var/cpanel/backuprunning". The legacy backup script will finish quick because legacy is disabled. But in some cases the pid entry in "/var/cpanel/backuprunning" is not cleaned up properly (it happened on one of our machines).

    This gives the error message:
    Code:
    "warn [backup] The other backup type is running as evidenced by the existence of:  /var/cpanel/backuprunning"
    By default the crontab generated by cPanel contains:
    Code:
    0 1 * * * /usr/local/cpanel/scripts/cpbackup
    0 2 * * * /usr/local/cpanel/bin/backup
    As you can see the legacy backup is attempted first. Therefore, the above failure will block the new backup entirely because the new version checks if the old version might be running through "/var/cpanel/backuprunning".

    So if legacy backup is not used it is even better to remove the cron entry for legacy period. To do it entirely right set the new backup script to start at the same time the legacy did in case there is limited time for a nightly run.

    Code:
    0 1 * * * /usr/local/cpanel/bin/backup
    After fixing this the new backup script is running properly again.
     
    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