Fix for Moodle Course Backup Timeout

If you have large courses in Moodle you may have already run into the issue where your automatic backups fail on one or more courses. This is due to Moodle using the PHP zip library to handle the compression duties instead of the host OS compression binaries. Until the developers change this or another plugin is created using the OS’s zip binary you can temporarily fix this by changing the timeout.

Edit the file /[your_moodle_path]/backup/util/progress/core_backup_progress_class.php Inside the file look for the  TIME_LIMIT_WITHOUT_PROGRESS  variable and change it from the default 120 to a higher setting. I found for my needs 600 seconds was enough to allow the large ~4GB+ courses to backup properly.

Look for this:

Screen Shot 2014-03-14 at 1.03.14 PM

Change to a higher timeout:

Screen Shot 2014-03-14 at 6.49.20 PM

This problem is already in the Moodle Bug Tracker.

You may also like...

2 Responses

  1. Tim Hunt says:

    Or, just upgrade to Moodle 2.6+ and use the ‘experimental’ Enable new backup format feature. That uses .tgz internally, and does not time out, and is pretty safe. We have been using it for a while at the OU.

    • Brad Arnold says:

      I’m running the weekly stable builds of 2.6+ so I’ll look into that for sure. I wasn’t aware that it was included in the experimental features yet, thanks for the tip!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">