Bonjour,
Pour la config, je suis en Moodle 3.8.1 / php 7.2
J'ai testé les fonctions de backup et restore sur une catégorie test contenant environ 15 cours
Il faut que je fasse plus de tests, cela va prendre un peu de temps.
Backup :
Globalement OK, 2 cours avec des erreurs de ce type
== Performing backup of Restauration du cours en cours copie 13 (Restauration_13)... ==
instantiating backup controller c991903b317cf97b6b07bf3a168502c0
setting controller status to 100
loading controller plan
setting controller status to 300
applying plan defaults
setting controller status to 400
setting file inclusion to
checking plan security
setting controller status to 500
setting controller status to 700
saving controller to db
calculating controller checksum 181f635e98766c8856ceb3fd326b2b68
loading controller from db
setting file inclusion to 1
setting controller status to 800
saving controller to db
calculating controller checksum 0bdb0a15acc83199495c133edea943ad
loading controller from db
PHP Warning: max(): Array must contain at least one element in /var/www/moodle-3.8/course/format/lib.php on line 287
Warning: max(): Array must contain at least one element in /var/www/moodle-3.8/course/format/lib.php on line 287
setting controller status to 1000
saving controller to db
Writing /var/lib/moodle/backup_prod/sauvegarde-moodle2-course-2218-restauration_13-20200109-0936.mbz
Backup completed.
Restore
Beaucoup moins bien, je n'ai pas pu restaurer tous les cours en 1 fois du fait d'erreurs.
Exemple d'erreur :
== Performing restore of "Cours MoodleBox" (cours1) to (cours1 with id 2382 in category 488) from file /var/lib/moodle/backup_prod/sauvegarde-moodle2-course-1647-cours1-20200109-0936.mbz (backupid is 689c2d3db5992bd76841bb0fe5eca404 target is NEW_COURSE and mode is general ==
instantiating restore controller 9c805edcfe8490cb036e8e2b2aa122cb
setting controller status to 100
loading backup info
loading controller plan
setting controller status to 300
applying restore defaults
Unknown setting: questionbank
setting controller status to 400
checking plan security
setting controller status to 600
saving controller to db
calculating controller checksum 9dbbf64727226f08645304c5d111605b
loading controller from db
setting controller status to 700
saving controller to db
calculating controller checksum 08864dc331297959d59f7d77f4284bc7
loading controller from db
setting controller status to 800
saving controller to db
calculating controller checksum 74b3749f80afcd22b48a88058b8aef88
loading controller from db
No LDAP Host URL, Version or User Type specified in your LDAP settings
Database transaction aborted automatically in /var/www/moodle-3.8/admin/cli/restore.php
Default exception handler: error/not_specified_restore_task Debug:
Error code: not_specified_restore_task
$a contents:
* line 44 of /backup/util/plan/restore_step.class.php: restore_step_exception thrown
* line 219 of /backup/util/plan/restore_structure_step.class.php: call to restore_step->get_restoreid()
* line 211 of /backup/util/plan/restore_structure_step.class.php: call to restore_structure_step->get_mapping()
* line 218 of /backup/moodle2/restore_plugin.class.php: call to restore_structure_step->get_mappingid()
* line 99 of /question/type/multichoice/backup/moodle2/restore_qtype_multichoice_plugin.class.php: call to restore_plugin->get_mappingid()
* line 86 of /question/type/multichoice/backup/moodle2/restore_qtype_multichoice_plugin.class.php: call to restore_qtype_multichoice_plugin->recode_choice_order()
* line 5519 of /backup/moodle2/restore_stepslib.php: call to restore_qtype_multichoice_plugin->recode_response()
* line 5497 of /backup/moodle2/restore_stepslib.php: call to restore_questions_activity_structure_step->questions_recode_response_data()
* line 5398 of /backup/moodle2/restore_stepslib.php: call to restore_questions_activity_structure_step->restore_question_attempt_step_worker()
* line 137 of /backup/util/plan/restore_structure_step.class.php: call to restore_questions_activity_structure_step->process_question_attempt_step()
* line 121 of /backup/util/helper/restore_structure_parser_processor.class.php: call to restore_structure_step->process()
* line 150 of /backup/util/xml/parser/processors/grouped_parser_processor.class.php: call to restore_structure_parser_processor->dispatch_chunk()
* line 208 of /backup/util/xml/parser/progressive_parser.class.php: call to grouped_parser_processor->after_path()
* line 288 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->inform_end()
* line ? of unknownfile: call to progressive_parser->end_tag()
* line 179 of /backup/util/xml/parser/progressive_parser.class.php: call to xml_parse()
* line 158 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->parse()
* line 110 of /backup/util/plan/restore_structure_step.class.php: call to progressive_parser->process()
* line 181 of /backup/util/plan/base_task.class.php: call to restore_structure_step->execute()
* line 210 of /backup/moodle2/restore_activity_task.class.php: call to base_task->execute()
* line 178 of /backup/util/plan/base_plan.class.php: call to restore_activity_task->execute()
* line 168 of /backup/util/plan/restore_plan.class.php: call to base_plan->execute()
* line 377 of /backup/controller/restore_controller.class.php: call to restore_plan->execute()
* line 222 of /admin/cli/restore.php: call to restore_controller->execute_plan()
!!! error/not_specified_restore_task !!!
!!
Error code: not_specified_restore_task
$a contents: !!
!! Stack trace: * line 44 of /backup/util/plan/restore_step.class.php: restore_step_exception thrown
* line 219 of /backup/util/plan/restore_structure_step.class.php: call to restore_step->get_restoreid()
* line 211 of /backup/util/plan/restore_structure_step.class.php: call to restore_structure_step->get_mapping()
* line 218 of /backup/moodle2/restore_plugin.class.php: call to restore_structure_step->get_mappingid()
* line 99 of /question/type/multichoice/backup/moodle2/restore_qtype_multichoice_plugin.class.php: call to restore_plugin->get_mappingid()
* line 86 of /question/type/multichoice/backup/moodle2/restore_qtype_multichoice_plugin.class.php: call to restore_qtype_multichoice_plugin->recode_choice_order()
* line 5519 of /backup/moodle2/restore_stepslib.php: call to restore_qtype_multichoice_plugin->recode_response()
* line 5497 of /backup/moodle2/restore_stepslib.php: call to restore_questions_activity_structure_step->questions_recode_response_data()
* line 5398 of /backup/moodle2/restore_stepslib.php: call to restore_questions_activity_structure_step->restore_question_attempt_step_worker()
* line 137 of /backup/util/plan/restore_structure_step.class.php: call to restore_questions_activity_structure_step->process_question_attempt_step()
* line 121 of /backup/util/helper/restore_structure_parser_processor.class.php: call to restore_structure_step->process()
* line 150 of /backup/util/xml/parser/processors/grouped_parser_processor.class.php: call to restore_structure_parser_processor->dispatch_chunk()
* line 208 of /backup/util/xml/parser/progressive_parser.class.php: call to grouped_parser_processor->after_path()
* line 288 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->inform_end()
* line ? of unknownfile: call to progressive_parser->end_tag()
* line 179 of /backup/util/xml/parser/progressive_parser.class.php: call to xml_parse()
* line 158 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->parse()
* line 110 of /backup/util/plan/restore_structure_step.class.php: call to progressive_parser->process()
* line 181 of /backup/util/plan/base_task.class.php: call to restore_structure_step->execute()
* line 210 of /backup/moodle2/restore_activity_task.class.php: call to base_task->execute()
* line 178 of /backup/util/plan/base_plan.class.php: call to restore_activity_task->execute()
* line 168 of /backup/util/plan/restore_plan.class.php: call to base_plan->execute()
* line 377 of /backup/controller/restore_controller.class.php: call to restore_plan->execute()
* line 222 of /admin/cli/restore.php: call to restore_controller->execute_plan()
!!
Potential coding error - existing temptables found when disposing database. Must be dropped!
Donc à suivre, cette fonctionnalité m'intéresse beaucoup.
Je vais essayer de trouver les origines de ces erreurs
Bruno