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

Automated backup failure causing all courses to fail

XMLWordPrintable

      During automated backups, if a course fails with an exception, the cleanup task is not run. This leaves the backup_ids_temp table in place, as well as files etc.

      The problem is that next backup cannot start because creation of the temp table will fail (throws exception ddltableexists).

      Currently, this appears to affect Moodle 2.5 and 2.4, but not the current master (pre-2.6).

      Replication steps:

      1. Set time limit in your php.ini something very large like a day.
      2. Log in as admin
      3. Ensure there are multiple courses created on your site.
      4. Navigate to a course in the middle (not the first or last)
      5. Add large files to that course so that it contains at least 6GB of media content spread over multiple activities.
      6. Set the following site configuration settings...
        • backup_auto_active - manual
        • backup_auto_storage - specified directory
        • backup_auto_destination - path to some writeable dir
      7. Run the script php admin/cli/automated_backup.php

      Expected result: Backup of the large course should fail, but others should succeed.

      Actual result: Backup of the large course fails, but so do courses that are backed up following it. They fail quickly.

      The log of the course backup supports what Tony has described.

      [17/10/2013 11:31:49 PM] [info] instantiating backup controller fce438d11f81798ed74c7369b0a08294
      [17/10/2013 11:31:49 PM] [debug] setting controller status to 100
      [17/10/2013 11:31:49 PM] [debug] loading controller plan
      [17/10/2013 11:31:49 PM] [debug] setting controller status to 300
      [17/10/2013 11:31:49 PM] [debug] applying plan defaults
      [17/10/2013 11:31:49 PM] [debug] setting controller status to 400
      [17/10/2013 11:31:49 PM] [info] checking plan security
      [17/10/2013 11:31:49 PM] [debug] setting controller status to 700
      [17/10/2013 11:31:49 PM] [debug] saving controller to db
      [17/10/2013 11:31:49 PM] [debug] calculating controller checksum 759ed72c7ceeb724a2d28bfc85903b6c
      [17/10/2013 11:31:49 PM] [debug] loading controller from db
      [17/10/2013 11:31:49 PM] [debug] setting controller status to 700
      [17/10/2013 11:31:49 PM] [debug] saving controller to db
      [17/10/2013 11:31:49 PM] [debug] calculating controller checksum 0a8a3b98cebaf467af8fc6c6710650db
      [17/10/2013 11:31:49 PM] [debug] loading controller from db
      [17/10/2013 11:31:49 PM] [debug] setting controller status to 800
      [17/10/2013 11:31:49 PM] [error] backup_auto_failed_on_course 24 Integration (MySQL) 103
      [17/10/2013 11:31:49 PM] [error]   Exception: ddltablealreadyexists backup_ids_temp
      [17/10/2013 11:31:49 PM] [debug]   Debug: 
      

            poltawski Dan Poltawski
            tlevi Tony Levi
            Dan Poltawski Dan Poltawski
            Damyon Wiese Damyon Wiese
            Damyon Wiese Damyon Wiese
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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