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

Automated backups : Skip backup of courses that have remained unmodified since last backup

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Major Major
    • 2.4
    • 2.4
    • Backup
    • MOODLE_24_STABLE
    • MOODLE_24_STABLE
    • git@github.com:StudiUM/moodle.git
    • MDL-32148-master
    • Hide
      1. Go to "Site administration > Courses > Backups > Automated backup setup" and set Active dropdown list to Manual
      • Testing of "backup_auto_skip_hidden"
      1. Go to "Site administration > Courses > Backups > Automated backup setup" and check "Skip hidden courses"
      2. Create 2 new courses that are not hidden
      3. Run file admin/cli/automated_backups.php from cli (php admin/cli/automated_backups.php).
        -> You should see in the output that the 2 courses are backed up.
      4. Go see in the restore page of each courses that the backup is there.
      5. Edit the 2 courses to be hidden
      6. Run file admin/cli/automated_backups.php from cli again.
        -> You should see in the output that the 2 courses are skipped with message "Skipping Course name (Not visible)"
      7. Go see in the restore page of each courses that the backup hasn't changed (time).
        -> The 2 new courses should be skipped from backup.
      • Testing of "backup_auto_skip_not_modif_since_days"
      1. Go to "Site administration > Courses > Backups > Automated backup setup" and select "3 days" in "Skip courses not modified since previous backup"
      2. Create 2 new courses that are not hidden
      3. Run file admin/cli/automated_backups.php from cli (php admin/cli/automated_backups.php).
        -> You should see in the output that the 2 courses are backed up.
      4. Go see in the restore page of each courses that the backup is there.
      5. Directly in the database, change the timemodified and the logs of the courses to greater than 3 days.
      6. Run file admin/cli/automated_backups.php from cli again.
        -> You should see in the output that the 2 courses are skipped with message "Skipping Course name (Not modified since XX days)"
      7. Go see in the restore page of each courses that the backup hasn't changed (time).
        -> The 2 new courses should be skipped from backup.
      • Testing of "backup_auto_skip_not_modif_since_prev"
      1. Go to "Site administration > Courses > Backups > Automated backup setup" and check "Skip courses not modified since previous backup"
      2. Create 2 new courses that are not hidden
      3. Run file admin/cli/automated_backups.php from cli (php admin/cli/automated_backups.php).
        -> You should see in the output that the 2 courses are backed up.
      4. Go see in the restore page of each courses that the backup is there.
      5. Run file admin/cli/automated_backups.php from cli again.
        -> You should see in the output that the 2 courses are skipped (Not modified since previous backup)
      6. Go see in the restore page of each courses that the backup hasn't changed (time).
        -> The 2 new courses should be skipped from backup.
        Repeat for each resources and activities
      7. Modifiy one of the courses by adding any resouces or activities (File, folders, assignment, forum...)
      8. Run file admin/cli/automated_backups.php from cli again.
        -> You should see in the output that the course you modified is backed up and the other skipped.
      9. Go see in the restore page of the courses that one backup has changed (time) and the other not.
        End for
      • TEST DIFFERENT COMBINATIONS OF SETTINGS
      • Rule should be that if one of the three is true, then the course is skipped from backup
      Show
      Go to "Site administration > Courses > Backups > Automated backup setup" and set Active dropdown list to Manual Testing of "backup_auto_skip_hidden" Go to "Site administration > Courses > Backups > Automated backup setup" and check "Skip hidden courses" Create 2 new courses that are not hidden Run file admin/cli/automated_backups.php from cli (php admin/cli/automated_backups.php). -> You should see in the output that the 2 courses are backed up. Go see in the restore page of each courses that the backup is there. Edit the 2 courses to be hidden Run file admin/cli/automated_backups.php from cli again. -> You should see in the output that the 2 courses are skipped with message "Skipping Course name (Not visible)" Go see in the restore page of each courses that the backup hasn't changed (time). -> The 2 new courses should be skipped from backup. Testing of "backup_auto_skip_not_modif_since_days" Go to "Site administration > Courses > Backups > Automated backup setup" and select "3 days" in "Skip courses not modified since previous backup" Create 2 new courses that are not hidden Run file admin/cli/automated_backups.php from cli (php admin/cli/automated_backups.php). -> You should see in the output that the 2 courses are backed up. Go see in the restore page of each courses that the backup is there. Directly in the database, change the timemodified and the logs of the courses to greater than 3 days. Run file admin/cli/automated_backups.php from cli again. -> You should see in the output that the 2 courses are skipped with message "Skipping Course name (Not modified since XX days)" Go see in the restore page of each courses that the backup hasn't changed (time). -> The 2 new courses should be skipped from backup. Testing of "backup_auto_skip_not_modif_since_prev" Go to "Site administration > Courses > Backups > Automated backup setup" and check "Skip courses not modified since previous backup" Create 2 new courses that are not hidden Run file admin/cli/automated_backups.php from cli (php admin/cli/automated_backups.php). -> You should see in the output that the 2 courses are backed up. Go see in the restore page of each courses that the backup is there. Run file admin/cli/automated_backups.php from cli again. -> You should see in the output that the 2 courses are skipped (Not modified since previous backup) Go see in the restore page of each courses that the backup hasn't changed (time). -> The 2 new courses should be skipped from backup. Repeat for each resources and activities Modifiy one of the courses by adding any resouces or activities (File, folders, assignment, forum...) Run file admin/cli/automated_backups.php from cli again. -> You should see in the output that the course you modified is backed up and the other skipped. Go see in the restore page of the courses that one backup has changed (time) and the other not. End for TEST DIFFERENT COMBINATIONS OF SETTINGS Rule should be that if one of the three is true, then the course is skipped from backup

      Skip backup of courses that have remained unmodified since last backup instead of unmodified in a month.

      The current state causes problem where backups of courses are done when you don't need to because nothing has changed.

      Benefits of this improvement :

      • less time to execute automated backups (Optimization of server resources like CPU)
      • less overall disk usage
      • Backup files that are kept (backup_auto_keep rotation) really are useful (no duplicates)

      If you have a large number of courses and a major users activity like we do (about 1300 active courses per semester), this is a must before any activation of the automated backups procedure.

            gaudreaj Jean-Philippe Gaudreau
            gaudreaj Jean-Philippe Gaudreau
            Frédéric Massart Frédéric Massart
            Sam Hemelryk Sam Hemelryk
            Michael de Raadt Michael de Raadt
            Votes:
            9 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved:

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