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

'Skip courses not modified since previous backup' not functioning properly when moodle contains large number of courses.

    XMLWordPrintable

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.4
    • None
    • Backup
    • None
    • MOODLE_34_STABLE

    Description

      Firstly litle background to our moodle: We have over 3000 courses, many of them have backups files with size over 1.5GB. So daily backups takes some time to complete.

      Because of this we started running to one problem: Times from table 'backup_courses' doesn´t match up to those in 'logstore_standard_log' for event course_backup_created. Time in logstore is greater then time of backup in table 'backup_courses'.

      So when that happen this method backup_cron_helper::is_course_modified ( backup/util/helper/backup_cron_helper.class.php ) returns true. (Because it has found one change, that is '\core\event\course_backup_created') And because of that it will begin backup of course, instead of skipping it.

       

      Solution is easy, replacing line 733 in backup/util/helper/backup_cron_helper.class.php

      From:

              $where = "courseid = :courseid and timecreated > :since and crud <> 'r'";

      To:
              $where = "courseid = :courseid and timecreated > :since and crud <> 'r' and eventname <> '\\core
      event
      course_backup_created'";

       

      It is also probably also better practice to not count backup events as changes to the course in this context.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jiřífryč Jiří Fryč
              Adrian Greeve, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated: