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

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

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.4
    • Component/s: Backup
    • Labels:
    • Testing Instructions:
      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
    • Affected Branches:
      MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE
    • Pull from Repository:
      git@github.com:StudiUM/moodle.git
    • Pull Master Branch:
      MDL-32148-master

      Description

      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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  9 Vote for this issue
                  Watchers:
                  10 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    3/Dec/12