Have setup some backup and cant see the are running when executing the following from the command line: Code: php /usr/local/ispconfig/server/cron_debug.php --cronjob=500-backup.inc.php The backups are set to run daily and a maximum of 10 but after 24 hours no no backup have been created?
Which kind of backup is not working? Mail, web, database? And when there is no further debug output shown, then there is no further debug output in that specific plugin.
Hi Till, Neither the web or database backups run for any of the configured site. I've set it up on the backup tab and left it for tow days too see if it runs at midnight but nothing happens. How would I debug this? Running the following works: Code: php /usr/local/ispconfig/server/cron_debug.php --cronjob=500-backup.inc.php It just doesn't run daily at midnight as expected?
Ok, so the backup is working but the cronjob is not running. Check your root crontab with: crontab -e it has to contain this line. Code: * * * * * /usr/local/ispconfig/server/cron.sh 2>&1 | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done
Have the following in there: Code: * * * * * /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 0 0 * * * /usr/local/ispconfig/server/scripts/create_daily_nginx_access_logs.sh &> /dev/null
That should be ok. Any errors when you run this command as root? /usr/local/ispconfig/server/cron.sh And other changes in ISPConfig get executed, or are they stuck in the queue as well?
No errors when running that command, and all other changes get executed, as in the flashing circle appears in top right hand corner after a change then goes away?
Then I must admit that I have no real idea, the backups are working when you run the plugin and the cronjob script does not return any errors. What you might try thoug is to edit the crontab with 'crontab -e' command, comment out a cronjob by adding a # in front, save and exit the editor. then do the same again and remove the comment. This forces the cron daemon to reload the crontab, maybe that helps.
I commented it out and ran the previous cron and go the following output: Code: #/usr/local/ispconfig/server/cron.sh c0_aps1 does not exceed quota qize: 0 > 10551296 c0_magento does not exceed quota qize: -1048576 > 18284544 c0_magento_dev does not exceed quota qize: -1048576 > 40304640 c0_roundcubemail does not exceed quota qize: -1048576 > 688128 c0_wordpressdb does not exceed quota qize: -1048576 > 56332288 c1_aps1 does not exceed quota qize: 0 > 44154880 c2_aps1 does not exceed quota qize: 0 > 13975552 /usr/bin/fail2ban-client /sbin/iptables /sbin/ip6tables /usr/bin/rkhunter But this is the same as what is seen in the "Show ISPC Cron-Log" section in the admin, nothing about backup script in there though?
Hi Till, I waited till midnight but the backup still did not run, is there a way to debug this to see if the script is even being called to run at midnight?
If your system has a cron log file, then you should find it there, or it might be just in the syslog file. Probably a grep in the files for cron.sh might help to see if it gets executed once per minute.
cron.sh is defiantly running in the syslog Code: Mar 9 11:57:01 server1 CRON[15336]: (root) CMD (/usr/local/ispconfig/server/cron.sh 2>&1 | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done) Mar 9 11:58:01 server1 CRON[17520]: (root) CMD (/usr/local/ispconfig/server/cron.sh 2>&1 | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done) And the cron.log also has entries: Code: Fri Mar 9 11:57:01 UTC 2018 Fri Mar 9 11:57:01 UTC 2018 Fri Mar 9 11:57:01 UTC 2018 c0_aps1 does not exceed quota qize: 0 > 10551296 Fri Mar 9 11:57:01 UTC 2018 finished. Fri Mar 9 11:57:01 UTC 2018 c0_magento does not exceed quota qize: -1048576 > 18153472 Fri Mar 9 11:57:02 UTC 2018 c0_magento_dev does not exceed quota qize: -1048576 > 40173568 Fri Mar 9 11:57:02 UTC 2018 c0_roundcubemail does not exceed quota qize: -1048576 > 688128 Fri Mar 9 11:57:02 UTC 2018 c0_wordpressdb does not exceed quota qize: -1048576 > 56332288 Fri Mar 9 11:57:02 UTC 2018 c1_aps1 does not exceed quota qize: 0 > 45072384 Fri Mar 9 11:57:02 UTC 2018 c2_aps1 does not exceed quota qize: 0 > 13959168 Fri Mar 9 11:57:02 UTC 2018 /usr/bin/fail2ban-client Fri Mar 9 11:57:02 UTC 2018 /sbin/iptables Fri Mar 9 11:57:02 UTC 2018 /sbin/ip6tables Fri Mar 9 11:57:02 UTC 2018 /usr/bin/rkhunter Fri Mar 9 11:58:02 UTC 2018 Fri Mar 9 11:58:02 UTC 2018 But how can I find out the 500-backup.inc.php script is being called at midnight as there is no mention of that in either?
The backup script has no further debug code as far as I know, so probably the only option will be that you add some debug code in there to see if it is run.
Any guidance on how I would do this and where the 500-backup.inc.php script is located as it is included with ispconfig?
I just talked with @Croydon and he reminded me that he fixed an issue in the backup system which might be related to your issue. Please use this command to install the latest version of the backup plugin, maybe this solves the issue: Code: wget -O /usr/local/ispconfig/server/lib/classes/cron.d/500-backup.inc.php https://git.ispconfig.org/ispconfig/ispconfig3/raw/stable-3.1/server/lib/classes/cron.d/500-backup.inc.php
Hi Till, I installed this script as suggested, and left the server running for a few days after a reboot, still no backups at midnight only when script is called manually?
Ok, then there might be a different issue on your system. as mentioned above, you might try to debug it or contact Florian from business support team if you need help by remote login.