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!

How to access legacy backup configuration in cPanel ver 78

Discussion in 'Data Protection' started by AndyB78, Mar 22, 2019.

Tags:
  1. AndyB78

    AndyB78 Well-Known Member

    Joined:
    Oct 7, 2003
    Messages:
    67
    Likes Received:
    1
    Trophy Points:
    158
    Location:
    Romania
    Hi,

    I'd like to use the legacy backup system in cPanel ver 78 but it's hidden due to deprecation.

    I need to do this because the new system will generate backups continually and will gradually fill up the entire available space if the network and NAS are not fast enough to keep up with the backup tarballs generation. So it's best to just use the old system where each account is backed up only after the previous one has been uploaded to the NAS.

    How can I re-enable the legacy backups?

    Thanks!
     
  2. AndyB78

    AndyB78 Well-Known Member

    Joined:
    Oct 7, 2003
    Messages:
    67
    Likes Received:
    1
    Trophy Points:
    158
    Location:
    Romania
    I have managed to access legacy backup by doing these:

    touch /etc/cpbackup.conf
    echo "BACKUPENABLE yes" > /etc/cpbackup.conf
    mv /var/cpanel/caches/_generated_command_files{,.backup}

    However I have not managed to start it with the /usr/local/cpanel/scripts/cpbackup line in crontab (nothing happened). But it started with a manually run /scripts/cpbackup. But I don't understand what's the difference. I've done a diff on the 2 files and there's no difference.
     
  3. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,272
    Likes Received:
    2,154
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @AndyB78,

    I've been unable to reproduce this behavior on a server running cPanel & WHM version 78.0.18. Can you browse to WHM >> Legacy Backup Configuration and click Save at the bottom of the interface to see if that addresses the issue? If not, can you check if any entries appear in /usr/local/cpanel/logs/error_log when executing the /usr/local/cpanel/scripts/cpbackup command?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. AndyB78

    AndyB78 Well-Known Member

    Joined:
    Oct 7, 2003
    Messages:
    67
    Likes Received:
    1
    Trophy Points:
    158
    Location:
    Romania
    Hello @Michael,

    Thank you for your investigation. I have further investigated the problem and I found out my initial report was flawed. This now seems to be a crond problem.

    The relevant crontab line is this:
    53 21 * * * /usr/local/cpanel/scripts/cpbackup

    So it should trigger at 21:53. But it doesn't. It triggers at 23:53:
    Mar 29 23:53:01 CROND[4773]: (root) CMD (/usr/local/cpanel/scripts/cpbackup)

    So this is why the croned script didn't trigger. The cron timing is wrong but I have no clue why. The hour is correct on the server:

    [root@host ~]# date; tail -1 /var/log/cron
    Sat Mar 30 01:14:56 EET 2019
    Mar 30 01:14:01 CROND[16104]: redacted

    So at least the crond log is in sync with system time. I have just restarted crond service and I'll see if this fixes the offset.
     
  5. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,272
    Likes Received:
    2,154
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Let me know if that helped. If not, try adding a root cron job like the one below:

    Code:
    5 * * * * date >> /root/cron.date
    You can adjust the "5" value to whichever minute is just beyond the current time. Then check /root/cron.date to see if crond is reporting the correct date.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. AndyB78

    AndyB78 Well-Known Member

    Joined:
    Oct 7, 2003
    Messages:
    67
    Likes Received:
    1
    Trophy Points:
    158
    Location:
    Romania
    Hello,

    I forgot to update this thread earlier: the crond restart fixed the problem. Sorry for the delay!

    I have one question about the new backup system (not the legacy one). I know it is generating backups locally on the server and then transports them remotely in time. But does it make any tests (like prior to generating the next account tarball) so that it doesn't fill up the entire local folder if the network is not fast enough?
     
  7. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,272
    Likes Received:
    2,154
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @AndyB78,

    The backup process and the transfer process use separate queues. If each backup completes much faster than each transfer, backup files can accumulate on the server and fill the hard drive.

    There's a disk space check to help prevent this from happening, but it occurs at the start of the backup generation process as opposed to in-between each individual account backup generation. You can configure the disk space check by adjusting the following option in WHM >> Backup Configuration:

    Check the Available Disk Space

    Additionally, while mostly unrelated to your specific question, the following document includes a good overview of how to configure backup retention settings:

    Backup Retention Behavior - cPanel Knowledge Base - cPanel Documentation

    Thank you.
     
    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