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

The backup_auto_skip_modif_prev setting is not always working.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.4, 3.4.3, 3.5
    • Fix Version/s: 3.4.5, 3.5.2
    • Component/s: Backup, Logging
    • Labels:
    • Testing Instructions:
      Hide
      1. Log into your test Moodle site as administrator.
      2. Create a test course,'course1'.
      3. Navigate to site administration > Courses > Backups > Automated backup setup.
      4. Ensure under Automated backup setup, Active (backup_auto_active) is set to Enabled.
      5. Ensure under Automated backup setup, Skip courses not modified since previous backup (backup_auto_skip_modif_prev) is checked (enabled).
      6. In your site's wwwroot, run: php admin/cli/automated_backups.php
      7. CONFIRM the backup runs to completion, and includes the following in the output: "Backing up course44...". This means the course has been backed up.
      8. Again, in your site's wwwroot, run: php admin/cli/automated_backups.php
      9. CONFIRM the execution runs to completion, but includes the following output: "Skipping course1 (Not modified since previous backup)". This means that the logging of the previous backup is not being treated as a modification to the course (so the fix is working).
      10. Return to the course (course1) you set up earlier, add any activity or resource to the course, so that the course has been modified.
      11. Again, in your site's wwwroot, run: php admin/cli/automated_backups.php.
      12. CONFIRM the backup runs to completion, and again includes "Backing up course44..." in the output. This confirms the fix doesn't stop backups occurring when there are changes to the course.
      Show
      Log into your test Moodle site as administrator. Create a test course,'course1'. Navigate to site administration > Courses > Backups > Automated backup setup. Ensure under Automated backup setup, Active (backup_auto_active) is set to Enabled . Ensure under Automated backup setup, Skip courses not modified since previous backup (backup_auto_skip_modif_prev) is checked (enabled). In your site's wwwroot, run: php admin/cli/automated_backups.php CONFIRM the backup runs to completion, and includes the following in the output: "Backing up course44...". This means the course has been backed up. Again, in your site's wwwroot, run: php admin/cli/automated_backups.php CONFIRM the execution runs to completion, but includes the following output: "Skipping course1 (Not modified since previous backup)". This means that the logging of the previous backup is not being treated as a modification to the course (so the fix is working). Return to the course (course1) you set up earlier, add any activity or resource to the course, so that the course has been modified. Again, in your site's wwwroot, run: php admin/cli/automated_backups.php. CONFIRM the backup runs to completion, and again includes "Backing up course44..." in the output. This confirms the fix doesn't stop backups occurring when there are changes to the course.
    • Affected Branches:
      MOODLE_34_STABLE, MOODLE_35_STABLE
    • Fixed Branches:
      MOODLE_34_STABLE, MOODLE_35_STABLE
    • Pull 3.5 Branch:
    • Pull Master Branch:
      MDL-61578-master

      Description

      When the backup_auto_skip_modif_prev setting is ticked, then courses should not be backed up when they are not modified.

      However, since the creation of the course_backup_created event (MDL-53537), courses are backed up because a backup has occurred.

      The creation of a course backup is not a modification of a course, so backup events in the logstore_standard_log should be ignored.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                8 Vote for this issue
                Watchers:
                14 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  10/Sep/18

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 30 minutes
                  30m