Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-38189 META Backup/restore issues with large courses
  3. MDL-41147

Large course restore fails due to time limit when unzipping

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.6
    • Fix Version/s: 2.6
    • Component/s: Backup
    • Labels:
    • Testing Instructions:
      Hide

      1. If you don't already have one, create the 'M' size course using MDL-38197.
      2. If you don't already have one, do a backup of the course (continue through all screens using default settings).
      3. Click 'Restore' link against the backup so that the first restore screen loads.

      EXPECTED:

      About five seconds after the page header appears, you should see a progress bar which indicates unzip progress. The progress bar should move across until the unzip finishes (which is usually before it reaches 100% - the percentage isn't very accurate). At that point it should disappear and the confirm screen should appear as normal.

      4. Continue through the restore process, restoring to a new course, until the restore actually completes. (Just to confirm the new code hasn't caused an error somewhere else.)

      Show
      1. If you don't already have one, create the 'M' size course using MDL-38197 . 2. If you don't already have one, do a backup of the course (continue through all screens using default settings). 3. Click 'Restore' link against the backup so that the first restore screen loads. EXPECTED: About five seconds after the page header appears, you should see a progress bar which indicates unzip progress. The progress bar should move across until the unzip finishes (which is usually before it reaches 100% - the percentage isn't very accurate). At that point it should disappear and the confirm screen should appear as normal. 4. Continue through the restore process, restoring to a new course, until the restore actually completes. (Just to confirm the new code hasn't caused an error somewhere else.)
    • Affected Branches:
      MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE
    • Pull Master Branch:
      MDL-41147-master

      Description

      I finally got a backup of a large course (the 'L' size from MDL-38197) to complete successfully, resulting in a 900MB backup.

      Unfortunately, this cannot be restored. On the first step of restore, I get this error:

      Fatal error: Maximum execution time of 120 seconds exceeded in /fs1/www_root/sm449/coremoodle/lib/filestorage/zip_archive.php on line 247
       
      Call Stack:
          0.0004     263576   1. {main}() /fs1/www_root/sm449/coremoodle/backup/restore.php:0
          0.5032   44979680   2. restore_ui_stage_confirm->process() /fs1/www_root/sm449/coremoodle/backup/restore.php:46
          0.5032   44979784   3. restore_ui_stage_confirm->extract_file_to_dir() /fs1/www_root/sm449/coremoodle/backup/util/ui/restore_ui_stage.class.php:159
          0.5033   44980744   4. zip_packer->extract_to_pathname() /fs1/www_root/sm449/coremoodle/backup/util/ui/restore_ui_stage.class.php:171
        120.0283   49357248   5. zip_archive->get_stream() /fs1/www_root/sm449/coremoodle/lib/filestorage/zip_packer.php:305
        120.0283   49357392   6. ZipArchive->getStream() /fs1/www_root/sm449/coremoodle/lib/filestorage/zip_archive.php:247
      

      I think the system needs to display progress during the unzip. (Progress is needed during the zip too for backup - see MDL-41087 - so I'll try to build API changes that can also be used for that.)

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  18/Nov/13