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

Remove old style backups from file system

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 2.4
    • 2.2.4, 2.3.1
    • Backup
    • MOODLE_22_STABLE, MOODLE_23_STABLE
    • MOODLE_24_STABLE
    • MDL-35116-master
    • Hide

      Test pre-requisites

      • Do not upgrade!
      • 7 courses (Considering IDs from 1 to 7. I will reuse those IDs later in the test.)
      • Set backup_auto_destination to some writeable directory
      • Set backup_shortname to True
      • Backup each course
        • Course #1 backup should be anonymous
        • Course #2 backup should not include user information
      • Place each backup in the backup_auto_destination folder

      Prepare files

      <Prefix> is probably: backup-moodle2-course

      1. Rename #1 to <prefix>-iamusingoldshortname.mbz
      2. Rename #2 to <prefix>-<OtherCourseID>-blah.mbz
      3. Rename #3 to <prefix>-9999-blah.mbz
      4. Rename #4 to something like iwontberenamed.mbz
      5. Rename #5 to something like <prefix>-<ID>-iwontberenamed.mbz
      6. Copy #6 to something like <prefix>-ialreadyexist.mbz
      7. Leave #7 unchanged

      Test steps

      1. Upgrade your Moodle
      2. Make sure that
        • #1, #2, #3 are renamed and include shortname (#1 and #2 should have a suffix '-nu' or '-an'
        • #4, #5, #6, #7 are not renamed
      Show
      Test pre-requisites Do not upgrade! 7 courses (Considering IDs from 1 to 7. I will reuse those IDs later in the test.) Set backup_auto_destination to some writeable directory Set backup_shortname to True Backup each course Course #1 backup should be anonymous Course #2 backup should not include user information Place each backup in the backup_auto_destination folder Prepare files <Prefix> is probably: backup-moodle2-course Rename #1 to <prefix>-iamusingoldshortname.mbz Rename #2 to <prefix>-<OtherCourseID>-blah.mbz Rename #3 to <prefix>-9999-blah.mbz Rename #4 to something like iwontberenamed.mbz Rename #5 to something like <prefix>-<ID>-iwontberenamed.mbz Copy #6 to something like <prefix>-ialreadyexist.mbz Leave #7 unchanged Test steps Upgrade your Moodle Make sure that #1, #2, #3 are renamed and include shortname (#1 and #2 should have a suffix '-nu' or '-an' #4, #5, #6, #7 are not renamed

      In MDL-28657 was introduced a new naming style for backup files. It allowed the course short names to be used instead of IDs.

      Unfortunately it created a regression (MDL-33812) because those new backups using short names were not being deleted during cron. MDL-33812 introduces a new naming convention which forces the ID to be in the backup name along with the short name or not.

      The goal of this issue is to find a way to nicely deleting the previously created backups:

      • Make sure there are no collision as 2 short names can be confused. Example: my-course and my-course-2.
      • Make sure we keep backups according to the setting backup_auto_keep. This means combining both new and old backups.

            fred Frédéric Massart
            fred Frédéric Massart
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Dan Poltawski Dan Poltawski
            Mark Nelson Mark Nelson
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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