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.

Backup not working

Discussion in 'Data Protection' started by ih8mondays, Aug 21, 2013.

  1. ih8mondays

    ih8mondays Registered

    Joined:
    Aug 21, 2013
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I am using WHM 11.38.1 (build 15). I have checked and made sure Legacy Backups are disabled and enabled the new backups for all users as posted in the link above. I can run /usr/local/cpanel/bin/backup from command line manually to generate the backups successfully. I also have the crontab entry to run it which was added by the install process. However, the backup script does not seem to run during the specified time in cron. Is there any way to fix this?

    EDIT: The backup destination is the default /backups directory on the local file system. I have not enabled FTP-based backup.
     
    #1 ih8mondays, Aug 21, 2013
    Last edited: Aug 21, 2013
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    I moved this post into it's own thread for you. Do you see any information in the backup log for the scheduled backup generation time? The backup logs are located in the following directory:

    Code:
    /usr/local/cpanel/logs/cpbackup/
    Thank you.
     
  3. ih8mondays

    ih8mondays Registered

    Joined:
    Aug 21, 2013
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Code:
    root@tanuki [/usr/local/cpanel/logs/cpbackup]# ls -l
    total 112
    drwx------ 2 root root  4096 Aug 21 13:04 ./
    drwxr-xr-x 5 root root  4096 Aug 20 04:51 ../
    -rw------- 1 root root 49558 Aug 20 05:02 1376974205.log
    -rw------- 1 root root 48318 Aug 21 13:13 1377090259.log
    root@tanuki [/usr/local/cpanel/logs/cpbackup]# date
    Thu Aug 22 08:27:05 UTC 2013
    That last log is from yesterday when I ran the backup manually via /usr/local/cpanel/bin/backup

    My crontab for root:

    Code:
    0 6 * * * /usr/local/cpanel/scripts/exim_tidydb > /dev/null 2>&1
    30 5 * * * /usr/local/cpanel/scripts/optimize_eximstats > /dev/null 2>&1
    2,58 * * * * /usr/local/bandmin/bandmin
    0 0 * * * /usr/local/bandmin/ipaddrmap
    0 4 * * * /usr/local/cpanel/scripts/upcp --cron
    0 1 * * * /usr/local/cpanel/scripts/cpbackup
    0 2 * * * /usr/local/cpanel/bin/backup
    35 * * * * /usr/bin/test -x /usr/local/cpanel/bin/tail-check && /usr/local/cpanel/bin/tail-check
    45 */4 * * * /usr/bin/test -x /usr/local/cpanel/scripts/update_mailman_cache && /usr/local/cpanel/scripts/update_mailman_cache
    30 */4 * * * /usr/bin/test -x /usr/local/cpanel/scripts/update_db_cache && /usr/local/cpanel/scripts/update_db_cache
    45 */8 * * * /usr/bin/test -x /usr/local/cpanel/bin/optimizefs && /usr/local/cpanel/bin/optimizefs
    30 */2 * * * /usr/local/cpanel/bin/mysqluserstore >/dev/null 2>&1
    15 */2 * * * /usr/local/cpanel/bin/dbindex >/dev/null 2>&1
    15 */6 * * * /usr/local/cpanel/scripts/autorepair recoverymgmt >/dev/null 2>&1
    */5 * * * * /usr/local/cpanel/bin/dcpumon >/dev/null 2>&1
    30 5 * * * /usr/local/cpanel/whostmgr/docroot/cgi/cpaddons_report.pl --notify
    5,20,35,50 * * * * /usr/local/cpanel/whostmgr/bin/dnsqueue > /dev/null 2>&1
    
    It should have run today at 2AM GMT. But as you can see above there is nothing in the log directory with that timestamp. It works properly when I run it manually. But somehow it does not work when it is run by cron, that is if it is indeed run by cron. The permissions on the backup command seem to be in order. There is also nothing in the /var/log/cron logfile to say what went wrong.
     
  4. harmeet

    harmeet Member

    Joined:
    Apr 18, 2013
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi,

    Have you checked if Cron daemon is running ?

    Thanks !
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Yes, check to see if the crond process is running:

    Code:
    pidof crond
    If it's not, you can restart crond via:

    Code:
    service crond restart
    Thank you.
     
  6. ih8mondays

    ih8mondays Registered

    Joined:
    Aug 21, 2013
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thank you. This is the reason why backup wasn't running. crond was not running, no idea why. I installed cPanel on a fresh OS install and I was assuming it had been started and configured during the OS installation process.
     
Loading...

Share This Page