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:
Change to a higher timeout:
This problem is already in the Moodle Bug Tracker.