Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-30390

Fatal error trying to restore a backup of a course

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.2
    • Fix Version/s: 2.2
    • Component/s: Backup
    • Labels:

      Description

      I got the following when trying to restore a backup of a course on the same site.
      I was admin with default settings/capabilities restoring the course as a new course in the misc category.
      The course itself has one single file upload with advanced grading rubric.

      error/exception 'dml_write_exception' with message 'Error writing to database' in /private/var/www/integration/lib/dml/moodle_database.php:397

      Stack trace:
      #0 /private/var/www/integration/lib/dml/pgsql_native_moodle_database.php(232): moodle_database->query_end(false)
      #1 /private/var/www/integration/lib/dml/pgsql_native_moodle_database.php(781): pgsql_native_moodle_database->query_end(false)
      #2 /private/var/www/integration/lib/dml/pgsql_native_moodle_database.php(833): pgsql_native_moodle_database->insert_record_raw('grading_instanc...', Array, true, false)
      #3 /private/var/www/integration/backup/moodle2/restore_stepslib.php(2000): pgsql_native_moodle_database->insert_record('grading_instanc...', Object(stdClass))
      #4 /private/var/www/integration/backup/util/plan/restore_structure_step.class.php(131): restore_activity_grading_structure_step->process_grading_instance(Array)
      #5 /private/var/www/integration/backup/util/helper/restore_structure_parser_processor.class.php(103): restore_structure_step->process(Array)
      #6 /private/var/www/integration/backup/util/xml/parser/processors/grouped_parser_processor.class.php(125): restore_structure_parser_processor->dispatch_chunk(Array)
      #7 /private/var/www/integration/backup/util/helper/restore_structure_parser_processor.class.php(91): grouped_parser_processor->postprocess_chunk(Array)
      #8 /private/var/www/integration/backup/util/xml/parser/processors/simplified_parser_processor.class.php(148): restore_structure_parser_processor->postprocess_chunk(Array)
      #9 /private/var/www/integration/backup/util/xml/parser/processors/progressive_parser_processor.class.php(92): simplified_parser_processor->process_chunk(Array)
      #10 /private/var/www/integration/backup/util/xml/parser/progressive_parser.class.php(169): progressive_parser_processor->receive_chunk(Array)
      #11 /private/var/www/integration/backup/util/xml/parser/progressive_parser.class.php(212): progressive_parser->publish(Array)
      #12 [internal function]: progressive_parser->start_tag(Resource id #2369, 'fillings', Array)
      #13 /private/var/www/integration/backup/util/xml/parser/progressive_parser.class.php(158): xml_parse(Resource id #2369, '<?xml version="...', 0)
      #14 /private/var/www/integration/backup/util/xml/parser/progressive_parser.class.php(137): progressive_parser->parse('<?xml version="...', false)
      #15 /private/var/www/integration/backup/util/plan/restore_structure_step.class.php(105): progressive_parser->process()
      #16 /private/var/www/integration/backup/util/plan/base_task.class.php(153): restore_structure_step->execute()
      #17 /private/var/www/integration/backup/moodle2/restore_activity_task.class.php(182): base_task->execute()
      #18 /private/var/www/integration/backup/util/plan/base_plan.class.php(148): restore_activity_task->execute()
      #19 /private/var/www/integration/backup/util/plan/restore_plan.class.php(157): base_plan->execute()
      #20 /private/var/www/integration/backup/controller/restore_controller.class.php(302): restore_plan->execute()
      #21 /private/var/www/integration/backup/util/ui/restore_ui.class.php(144): restore_controller->execute_plan()
      #22 /private/var/www/integration/backup/restore.php(46): restore_ui->execute() #23

      Unknown macro: {main}



      parse('process() #16 /private/var/www/integration/backup/util/plan/base_task.class.php(153): restore_structure_step->execute() #17 /private/var/www/integration/backup/moodle2/restore_activity_task.class.php(182): base_task->execute() #18 /private/var/www/integration/backup/util/plan/base_plan.class.php(148): restore_activity_task->execute() #19 /private/var/www/integration/backup/util/plan/restore_plan.class.php(157): base_plan->execute() #20 /private/var/www/integration/backup/controller/restore_controller.class.php(302): restore_plan->execute() #21 /private/var/www/integration/backup/util/ui/restore_ui.class.php(144): restore_controller->execute_plan() #22 /private/var/www/integration/backup/restore.php(46): restore_ui->execute() #23

      ">More information about this error

      Stack trace:
      line 49 of /backup/restore.php: moodle_exception thrown

        Attachments

          Activity

            People

            Assignee:
            mudrd8mz David Mudrák (@mudrd8mz)
            Reporter:
            samhemelryk Sam Hemelryk
            Integrator:
            Eloy Lafuente (stronk7)
            Tester:
            Adrian Greeve
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              5/Dec/11