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

Restoring automated backup on different environment

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 2.7
    • Backup, Course completion
    • None
    • MOODLE_27_STABLE

      I recently deleted a course off my testing environment, but now when i try restore a course i keep getting the below message?

      Error writing to database

      More information about this error

      Debug info: Duplicate entry '3087-173' for key 'mdl_courcomp_usecou_uix'
      INSERT INTO mdl_course_completions (userid,course,timeenrolled,timestarted,timecompleted,reaggregate) VALUES(?,?,?,?,?,?)
      [array (
      0 => '3087',
      1 => 173,
      2 => 1405591460,
      3 => '0',
      4 => NULL,
      5 => '1405591510',
      )]
      Error code: dmlwriteexception
      Stack trace:
      line 446 of /lib/dml/moodle_database.php: dml_write_exception thrown
      line 1098 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
      line 1144 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
      line 2504 of /backup/moodle2/restore_stepslib.php: call to mysqli_native_moodle_database->insert_record()
      line 137 of /backup/util/plan/restore_structure_step.class.php: call to restore_course_completion_structure_step->process_course_completions()
      line 103 of /backup/util/helper/restore_structure_parser_processor.class.php: call to restore_structure_step->process()
      line 151 of /backup/util/xml/parser/processors/grouped_parser_processor.class.php: call to restore_structure_parser_processor->dispatch_chunk()
      line 91 of /backup/util/helper/restore_structure_parser_processor.class.php: call to grouped_parser_processor->postprocess_chunk()
      line 148 of /backup/util/xml/parser/processors/simplified_parser_processor.class.php: call to restore_structure_parser_processor->postprocess_chunk()
      line 92 of /backup/util/xml/parser/processors/progressive_parser_processor.class.php: call to simplified_parser_processor->process_chunk()
      line 190 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser_processor->receive_chunk()
      line 278 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->publish()
      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 177 of /backup/util/plan/base_plan.class.php: call to base_task->execute()
      line 167 of /backup/util/plan/restore_plan.class.php: call to base_plan->execute()
      line 333 of /backup/controller/restore_controller.class.php: call to restore_plan->execute()
      line 184 of /backup/util/ui/restore_ui.class.php: call to restore_controller->execute_plan()
      line 107 of /backup/restore.php: call to restore_ui->execute()

            Unassigned Unassigned
            atainton Andrew Tainton
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.