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

Failure to backup course causes subsequent courses to fail (Automated backups)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 2.4.6, 2.5.2
    • Fix Version/s: None
    • Component/s: Backup
    • Labels:
    • Affected Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE

      Description

      When using automated backups, when a course backup fails, for example through it being overly large, subsequent course backups all fail, regardless of their content.

      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.

      Looking at the results of the automated backup...

      • In the temp folder, folders are created for subsequent courses, but no content is added to them.
      • The log of the course backup contains little data and ends abruptly with an exception.

        [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: 
        

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                salvetore Michael de Raadt
                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: