Quantcast
Channel: Backup and restore
Viewing all articles
Browse latest Browse all 6815

Re: Backup via moosh failed

$
0
0
by Francis Lorenzo Guingao Doydora.  

Hi Ken,

I've updated moosh and it now shows version 1.3 but the error still exists. Please find attached the error.

elearnadmin@elearn2:/var/www/html/moodle$ moosh -n course-backup --fullbackup -f /home/elearnadmin/Backups/mybackup.mbz 4672
Default exception handler: Error reading from database Debug: MySQLserver 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 => '440e40b4398f39af51195d9101f720fb',
)]
Error code: dmlreadexception
* 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 2088 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 95 of /home/elearnadmin/moosh/Moosh/Command/Moodle39/Course/CourseBackup.php: call to backup_controller->execute_plan()
* line 361 of /home/elearnadmin/moosh/moosh.php: call to Moosh\Command\Moodle39\Course\CourseBackup->execute()

!!! Error reading from database !!!

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 => '440e40b4398f39af51195d9101f720fb',
)]
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 2088 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 95 of /home/elearnadmin/moosh/Moosh/Command/Moodle39/Course/CourseBackup.php: call to backup_controller->execute_plan()
* line 361 of /home/elearnadmin/moosh/moosh.php: call to Moosh\Command\Moodle39\Course\CourseBackup->execute()
Exception ignored in shutdown function tool_log\log\manager::dispose: Error reading from database (MySQL server has gone away
SHOW VARIABLES LIKE 'max_allowed_packet'
[NULL])
Exception ignored in shutdown function tool_monitor\eventobservers::process_buffer: Error reading from database (MySQL server has gone away
SHOW VARIABLES LIKE 'max_allowed_packet'
[NULL])
Potential coding error - existing temptables found when disposing database. Must be dropped!
PHP Fatal error:  Uncaught ddl_change_structure_exception: DDL sql execution error (MySQL server has gone away
DROP TEMPORARY TABLE mdl_backup_ids_temp) in /var/www/html/moodle/lib/dml/moodle_database.php:492
Stack trace:
#0 /var/www/html/moodle/lib/dml/mysqli_native_moodle_database.php(1098): moodle_database->query_end()
#1 /var/www/html/moodle/lib/ddl/database_manager.php(77): mysqli_native_moodle_database->change_database_structure()
#2 /var/www/html/moodle/lib/ddl/database_manager.php(332): database_manager->execute_sql_arr()
#3 /var/www/html/moodle/lib/dml/moodle_temptables.php(140): database_manager->drop_table()
#4 /var/www/html/moodle/lib/dml/moodle_database.php(405): moodle_temptables->dispose()
#5 /var/www/html/moodle/lib/dml/mysqli_native_moodle_database.php(622): moodle_database->dispose()
#6 /var/www/html/moodle/lib/dml/moodle_database.php(160): mysqli_native_moodle_database->dispose()
#7 [internal function]: moodle_database->__destruct()
#8 {main}
  thrown in /var/www/html/moodle/lib/dml/moodle_database.php on line 492

Fatal error: Uncaught ddl_change_structure_exception: DDL sql execution error (MySQL server has gone away
DROP TEMPORARY TABLE mdl_backup_ids_temp) in /var/www/html/moodle/lib/dml/moodle_database.php:492
Stack trace:
#0 /var/www/html/moodle/lib/dml/mysqli_native_moodle_database.php(1098): moodle_database->query_end()
#1 /var/www/html/moodle/lib/ddl/database_manager.php(77): mysqli_native_moodle_database->change_database_structure()
#2 /var/www/html/moodle/lib/ddl/database_manager.php(332): database_manager->execute_sql_arr()
#3 /var/www/html/moodle/lib/dml/moodle_temptables.php(140): database_manager->drop_table()
#4 /var/www/html/moodle/lib/dml/moodle_database.php(405): moodle_temptables->dispose()
#5 /var/www/html/moodle/lib/dml/mysqli_native_moodle_database.php(622): moodle_database->dispose()
#6 /var/www/html/moodle/lib/dml/moodle_database.php(160): mysqli_native_moodle_database->dispose()
#7 [internal function]: moodle_database->__destruct()
#8 {main}
  thrown in /var/www/html/moodle/lib/dml/moodle_database.php on line 492

I've tried the moodle built-in backup cli script and attached is the error.

elearnadmin@elearn2:/var/www/html/moodle$ sudo -u www-data /usr/bin/php admin/cli/backup.php --courseid=4672 --destination=/home/elearnadmin/Backups/
[sudo] password for elearnadmin:
== Performing backup... ==
!!! Error reading from database !!!
Potential coding error - existing temptables found when disposing database. Must be dropped!

Viewing all articles
Browse latest Browse all 6815

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>