Issues with Backups

Issues with Backups

by Aki Tsirigotis -
Number of replies: 3

Hi everyone,

I searched through the forums on this issue and followed some of the recommendations and still no solution. So this is my issue:

I tried to copy a course and it seems that the copy function gets stuck in "neverland." I turned off asynchronous backups and still nothing. It seems that I have 7 backups (5 skipped) and 2 pending for October 4th (even though all 7 were pending to be backed-up today at 1:30 pm and only a web-based cron job "nudge" by yours-truly pushed them to skipped/queued). I try to do an old fashioned course backup through the course site itself, it tells me that that this course is already pending a back up process.

Then, I tried doing a traditional course backup with another user account. Voila! I can back up the course and then it either gets stuck at 97.55% or I get a lovely error message (see below). I am at a loss. 

I am on Moodle 3.9.2 (this issue was occurring on Moodle 3.9.1 as well but I thought upgrading would fix it) and I am on the Moove theme (free version). I have never had these issues before.

P.S. #1: I am a bit of a newbie when it comes to databases but with good instructions, I can manage to figure it out. What the heck am I doing wrong? How the heck can I fix this?

P.S. #2: I am also having an issue of H5P (core) updating its activity library. Not sure if this is related.

Error message: 

×Debug info: MySQL server has gone away
SELECT count(r.repositoryid)
FROM mdl_files f
LEFT JOIN mdl_files_reference r
ON r.id = f.referencefileid
JOIN mdl_backup_ids_temp bi
ON f.id = bi.itemid
WHERE bi.backupid = ?
AND bi.itemname = 'filefinal'
[array (
0 => '60269c435d4269779a4d891445da6e9f',
)]
Error code: dmlreadexception
×Stack trace:
  • line 486 of /lib/dml/moodle_database.php: dml_read_exception thrown
  • line 1273 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
  • line 1624 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
  • line 1697 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()
  • line 1907 of /lib/dml/moodle_database.php: call to moodle_database->get_field_sql()
  • line 522 of /backup/util/dbops/backup_controller_dbops.class.php: call to moodle_database->count_records_sql()
  • line 2077 of /backup/moodle2/backup_stepslib.php: call to backup_controller_dbops::backup_includes_file_references()
  • line 34 of /backup/util/plan/backup_execution_step.class.php: call to backup_store_backup_file->define_execution()
  • line 181 of /backup/util/plan/base_task.class.php: call to backup_execution_step->execute()
  • line 178 of /backup/util/plan/base_plan.class.php: call to base_task->execute()
  • line 145 of /backup/util/plan/backup_plan.class.php: call to base_plan->execute()
  • line 410 of /backup/controller/backup_controller.class.php: call to backup_plan->execute()
  • line 136 of /backup/util/ui/backup_ui.class.php: call to backup_controller->execute_plan()
  • line 175 of /backup/backup.php: call to backup_ui->execute()

Average of ratings: -
In reply to Aki Tsirigotis

Re: Issues with Backups

by Ken Task -
Particularly helpful Moodlers को तस्बिर

Think the issue is this: "MySQL server has gone away" which generally means max_allowed_packets setting of MySQL is too low.

https://dev.mysql.com/doc/refman/5.7/en/program-variables.html

mysql> show variables like 'max_allowed_packet';

Think default is 8M ... increase it to 16M.

'SoS', Ken


In reply to Ken Task

Re: Issues with Backups

by Aki Tsirigotis -
Hi Ken,
Thank you for responding. I just spoke to my hosting service and they told me that it is set 16M. Ugh. So frustrating.
In reply to Aki Tsirigotis

Re: Issues with Backups

by Ken Task -
Particularly helpful Moodlers को तस्बिर

They won't increase it for you?  You must be on a shared hosting plan.

If you don't upgrade your plan, guess you're stuck with no automated backups and backing up each course that can be backed up individually.  The ones that have the issues, back them up in parts ... like sec1-5 with/without users for one and sec6-10 with/without users for another.

'SoS', Ken