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

    • Icon: Bug Bug
    • Resolution: Deferred
    • Icon: Minor Minor
    • None
    • 3.4
    • Backup
    • None
    • MOODLE_34_STABLE

      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.

            Unassigned Unassigned
            jiřífryč Jiří Fryč
            Votes:
            3 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.