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

Re-introduce backup/restore functionality with new logging system

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Backup & restore consistency

      A) Run unit tests.

      B) Without the patch applied, create a course. Add 2 workshops and 2 (new) assignment activities to them. Play with them with both the teacher and student roles (submit work, grade it...).

      • Perform a backup of the course, including user info, and download it.
      • Apply the patch.
      • Perform a backup of the course, including user info, and download it.
      • Uncompress both backups and (recursively) diff them.
      • Differences should be incidental (some datetime, some extra log record...) and, in any case, they should not affect to workshop and assignment activity structures (any <subplugin.......> element in the XMLs).
        Repeat the above in a 2.8 site but perform the restore on integration master.

      C) Make sure all is well in behat land.

      Test session

      This will require a test session. We want all the activities to be split up, with roughly even amount of events in each group. So, if one activity (A) has 12 events and another (B) has 8 and (C) has 4 - one person would test A and another B and C. You should not see debugging messages during the process.

      1. Make sure debugging is on so debugging messages are displayed on your site. (Site administration > Development > Debugging).
      2. Enable both standard and database logging (Site administration > Plugins > Logging). You will need to set up an external database to fill with logs.
      3. Create a course.
      4. For the events that you are testing trigger them in the course (note 'assign' and 'book' trigger events in their sub-plugins).
      5. Backup the course and go through the restore process, once you reach the final step with the restore outcome execute this JS in your browser console Y.one('#executionprogress').setStyle('display', 'block') and verify that there are no previously hidden debugging messages.
      6. View the database logs in both your external DB table and standard table and ensure that 'objectid' and 'other' were mapped correctly
      Show
      Backup & restore consistency A) Run unit tests. B) Without the patch applied, create a course. Add 2 workshops and 2 (new) assignment activities to them. Play with them with both the teacher and student roles (submit work, grade it...). Perform a backup of the course, including user info, and download it. Apply the patch. Perform a backup of the course, including user info, and download it. Uncompress both backups and (recursively) diff them. Differences should be incidental (some datetime, some extra log record...) and, in any case, they should not affect to workshop and assignment activity structures (any <subplugin.......> element in the XMLs). Repeat the above in a 2.8 site but perform the restore on integration master. C) Make sure all is well in behat land. Test session This will require a test session. We want all the activities to be split up, with roughly even amount of events in each group. So, if one activity (A) has 12 events and another (B) has 8 and (C) has 4 - one person would test A and another B and C. You should not see debugging messages during the process. Make sure debugging is on so debugging messages are displayed on your site. (Site administration > Development > Debugging). Enable both standard and database logging (Site administration > Plugins > Logging). You will need to set up an external database to fill with logs. Create a course. For the events that you are testing trigger them in the course (note 'assign' and 'book' trigger events in their sub-plugins). Backup the course and go through the restore process, once you reach the final step with the restore outcome execute this JS in your browser console Y.one('#executionprogress').setStyle('display', 'block') and verify that there are no previously hidden debugging messages. View the database logs in both your external DB table and standard table and ensure that 'objectid' and 'other' were mapped correctly
    • Affected Branches:
      MOODLE_27_STABLE, MOODLE_28_STABLE, MOODLE_29_STABLE
    • Fixed Branches:
      MOODLE_30_STABLE
    • Epic Link:
    • Pull from Repository:
    • Pull Master Branch:
      MDL-46455-master-20151012
    • Story Points:
      100
    • Sprint:
      Team Beards Sprint 4, Team Beards Sprint 5, Team Beards Sprint 6, Team Both Sprint 1
    • Issue size:
      Epic

      Description

      Currently the new logging stores do not support backup/restore. This is critical information, especially if we plan on using it more and more, so the functionality should exist. We are removing the usage of the legacy logs, and only have the legacy log store for BC, so new sites won't be backing up/restoring any logging information.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                30 Vote for this issue
                Watchers:
                32 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  16/Nov/15