Not sure if this is the right place, but our auto backup fails when it hits a course containing a scorm object, and of course the flag in the db isn't reset, so it doesn't try again, as discussed above.
I've traced a cause of this failure (at least on IIS/MSSQL, running ms native driver) to backup_structure_dbops_class,
public static function move_annotations_to_final($backupid, $itemname)
for some reason, when it hits
$DB->set_field('backup_ids_temp', 'itemname', $itemname . 'final', array('id' => $annotation->id));
the query it sends
"UPDATE #mdl_backup_ids_temp SET itemname = N'filefinal' WHERE id = '3'"
doesn't return, doesn't complete, doesn't error. Eventually the process gets killed by the web server.
I did find that adding a timeout to the database do_query function in sqlsrv_native_moodle_database
$result = sqlsrv_query($this->sqlsrv, $sql,array(),array('QueryTimeout'=>5));
at least returns an error. rather than just hanging indefinitely.
Are the following messages related to the above?
Error message /admin/cron.php (via browser):
Checking automated backup status...RUNNING
automated backup are already running. Execution delayed
Error message /admin/cli/automated_backups.php (via commandline):
Checking automated backup status...RUNNING
automated backups are already. If this script is being run by cron this constitues an error. You will need to increase the time between executions within cron.
Automated cron backups completed correctly
Cryptic last line because nothing happens