Hi all,
I'm trying to backup the courses and activities from an old moodle site to restore in a new moodle site. I've tried updating the max_allow_packet up to 1024M, backup through moosh, automated backup, and the regular backup.php on the cli. I keep getting the below error, I'm not using MNET and my backup is specifying no user data. I could really use some help!
Thanks!
root@sga [/home/sgaweb/public_html/campus]# moosh -n course-backup --template -f '/home/sgaweb/public_html/course_backup/Practical Employee Relations - Replacing Liability with Credibility.mbz' 11
!!! Error reading from database !!!
SELECT COUNT(*)
FROM mdl_backup_ids_temp b
JOIN mdl_user u ON u.id = b.itemid
WHERE b.backupid = ?
AND b.itemname = 'userfinal'
AND u.mnethostid != ?
[array (
0 => 'a72c5eb79bacd04db0032d13eb45f4ce',
1 => '1',
)]
Error code: dmlreadexception !!
!! Stack trace: * line 443 of /lib/dml/moodle_database.php: dml_read_exception thrown
* line 1080 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
* line 1476 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
* line 1549 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()
* line 1759 of /lib/dml/moodle_database.php: call to moodle_database->get_field_sql()
* line 471 of /backup/util/dbops/backup_controller_dbops.class.php: call to moodle_database->count_records_sql()
* line 1552 of /backup/moodle2/backup_stepslib.php: call to backup_controller_dbops::backup_includes_mnet_remote_users()
* line 88 of /backup/util/plan/backup_structure_step.class.php: call to backup_main_structure_step->define_structure()
* line 181 of /backup/util/plan/base_task.class.php: call to backup_structure_step->execute()
* line 177 of /backup/util/plan/base_plan.class.php: call to base_task->execute()
* line 120 of /backup/util/plan/backup_plan.class.php: call to base_plan->execute()
* line 320 of /backup/controller/backup_controller.class.php: call to backup_plan->execute()
* line 95 of /root/moosh/Moosh/Command/Moodle23/Course/CourseBackup.php: call to backup_controller->execute_plan()
* line 361 of /root/moosh/moosh.php: call to Moosh\Command\Moodle23\Course\CourseBackup->execute()
!!
Warning: var_export does not handle circular references in /home/sgaweb/public_html/campus/lib/classes/shutdown_manager.php on line 83
Warning: var_export does not handle circular references in /home/sgaweb/public_html/campus/lib/classes/shutdown_manager.php on line 83
Warning: var_export does not handle circular references in /home/sgaweb/public_html/campus/lib/classes/shutdown_manager.php on line 83
Warning: var_export does not handle circular references in /home/sgaweb/public_html/campus/lib/classes/shutdown_manager.php on line 83
Warning: var_export does not handle circular references in /home/sgaweb/public_html/campus/lib/classes/shutdown_manager.php on line 83
Fatal error: Uncaught exception 'dml_read_exception' with message 'Error reading from database' in /home/sgaweb/public_html/campus/lib/dml/moodle_database.php:443
Stack trace:
#0 /home/sgaweb/public_html/campus/lib/dml/mysqli_native_moodle_database.php(526): moodle_database->query_end(false)
#1 /home/sgaweb/public_html/campus/lib/ddl/sql_generator.php(230): mysqli_native_moodle_database->get_tables()
#2 /home/sgaweb/public_html/campus/lib/ddl/database_manager.php(99): sql_generator->table_exists(Object(xmldb_table))
#3 /home/sgaweb/public_html/campus/lib/ddl/database_manager.php(318): database_manager->table_exists(Object(xmldb_table))
#4 /home/sgaweb/public_html/campus/lib/dml/moodle_temptables.php(140): database_manager->drop_table(Object(xmldb_table))
#5 /home/sgaweb/public_html/campus/lib/dml/moodle_database.php(370): moodle_temptables->dispose()
#6 /home/sgaweb/public_html/campus/lib/dml/mysqli_native_moodle_database.php(481): moodle_database->dispose()
#7 /home/sgaweb/public_html/campus/lib/dml/moodle_database.php(1 in /home/sgaweb/public_html/campus/lib/dml/moodle_database.php on line 443