Course backups failing with cron error fclose()

Re: Course backups failing with cron error fclose()

by Ken Task -
Number of replies: 0
Picture of Particularly helpful Moodlers

I'll take a stab at it ...

async backup means someone started a backup of a course and rather than waiting at the screen which shows the backup process and completion, clicked the link to go onto other things, thus putting that backup process in background.

Could be that other cron job task to clean up temp areas ... like moodledata/temp/backup/ has kicked in and erased the async backup job in progress.

And of course, adhoc_task now has a reference that an async backup process did not finish and to try it again!

Added to the confusion is recyclebin ... something deleted is tagged as a recyclebin backup and held for X duration (settings for recyclebin), then moved to trashdir and held for X duration - 4 days - then finally erased.

So ... I'd turn off async backups.

Manually remove any directories in moodledata/temp/backup/ that show a past date/time.

From command line in moodlecode/admin/tool/task/cli/

run php adhoc_task.php to see what it says ... and php schedule_task.php to see what it says.

I have a bash shell script in moodlecode/admin/tool/task/cli/ called 'cleanup' on a site, that contains the following:

php schedule_task.php --execute="\logstore_standard\task\cleanup_task";
php schedule_task.php --execute="\core\task\backup_cleanup_task";
php schedule_task.php --execute="\core\task\cache_cleanup_task";
php schedule_task.php --execute="\core\task\file_temp_cleanup_task";
php schedule_task.php --execute="\core\task\file_trash_cleanup_task";
php schedule_task.php --execute="\core\task\session_cleanup_task";
php schedule_task.php --execute="\core_files\task\conversion_cleanup_task";
php schedule_task.php --execute="\tool_recyclebin\task\cleanup_category_bin";
php schedule_task.php --execute="\tool_recyclebin\task\cleanup_course_bin";
php schedule_task.php --execute="\core\task\messaging_cleanup_task";
php schedule_task.php --execute="\core\task\delete_incomplete_users_task";
php schedule_task.php --execute="\core\task\delete_unconfirmed_users_task";

Each one of those will show info like it would if run as part of the overall cron job and if there are issues, those will show.   This way one at least gets a target to pursue! smile

Comment: don't know that above will fix your issue or not. :|

'SoS', Ken