Web backups not running with cron

Discussion in 'ISPConfig 3 Priority Support' started by invino, May 17, 2019.

  1. invino

    invino Member HowtoForge Supporter

    Hey Till,

    I have a problem with my website backups (files and db).

    1. the crontab -e command give me the right lines:
    Code:
    0 6 * * *  /etc/cron.daily/mailq
    * * * * * /usr/local/ispconfig/server/server.sh 2>&1 | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done
    * * * * * /usr/local/ispconfig/server/cron.sh 2>&1 | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done
    2. I can also run the debug line of code and every backup is done properly:
    Code:
    php /usr/local/ispconfig/server/cron_debug.php --cronjob=500-backup.inc.php
    3. I checked in the logs after my last test (/var/log/ispconfig/cron.log) and no error at all.

    4. I also noticed on the admin panel's homepage, that website quotas are no longer updated. Same problem for traffic. Maybe that's connected?

    5. Emails are not affected by all of this.

    This issue started on March 7 apparently and we had a PHP update at that time. But we can't figure out what's happening here as nothing is showing up in the logs and we're left in the dark...

    Your help would be greatly appreciated :)

    Thanks!
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Did you check in the Linux syslog if the cronjobs are started at all? Maybe cron daemon is no0t executing the cron.sh and server.sh scripts. Sometimes it helps to edit the root crontab, add a line and save it as this triggers cron to reload the crontab.
     
  3. invino

    invino Member HowtoForge Supporter

    I just checked and every minute, there is this:
    Code:
    May 17 11:44:01 ***** CRON[13642]: (root) CMD (/usr/local/ispconfig/server/cron.sh 2>&1 | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done)
    May 17 11:44:01 ***** CRON[13641]: (root) CMD (/usr/local/ispconfig/server/server.sh 2>&1 | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done)
    Do you think I need to ad this (empty?) line in the crontab anyway?

    Thanks :)
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    No, the cron is running indeed.

    Please run:

    which php

    and

    php --version

    and post the output.

    When

    php /usr/local/ispconfig/server/cron_debug.php --cronjob=500-backup.inc.php

    works but not the cronjob, then the cronjob might use a different PHP version. Just a guess.
     
  5. invino

    invino Member HowtoForge Supporter

    Thanks Till,
    Here is what I have:
    Code:
    root@*****:# which php
    /usr/bin/php
    
    root@*****:# php --version
    PHP 5.6.22-1 (cli)
    Copyright (c) 1997-2016 The PHP Group
    Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
        with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
    What do you think?
     
  6. invino

    invino Member HowtoForge Supporter

    Hi Till,
    Any idea about this issue? On our end, we can't figure out where the problem is coming from...
    Thanks in advance :)
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Not really. The PHP version info looks fine. Did you modify anything in the backup plugin code e.g. to alter the time when the backups are executed?
     
  8. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Did you verify what PHP version the cron job uses? Issue those same version check commands in cron job and for example email the results to yourself.
     
  9. invino

    invino Member HowtoForge Supporter

    Hi Till,
    I didn't change anything in the backup script.

    Hi Taleman,
    Good idea, I'm going to try that!

    Thank you both!
     
  10. invino

    invino Member HowtoForge Supporter

    Hi,
    I just wanted to do a quick follow-up on this issue. We've tried checking the PHP version used by CRON by using CRON itself to generate it and everything is fine; exact same PHP version...

    I'm going to ask for specific support from Florian as for now, as it looks really weird and we apparently exhausted every option. Let's hope we end up finding the culprit soon!

    Thanks for your help!
     
    Gwyneth Llewelyn and till like this.

Share This Page