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

Courses automated backup does not delete old backups from filesystem when backup_shortname is set

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 2.2.5, 2.3.2
    • 2.2.3, 2.3
    • Backup
    • Any
    • MOODLE_22_STABLE, MOODLE_23_STABLE
    • MOODLE_22_STABLE, MOODLE_23_STABLE
    • MDL-33531_master
    • Hide

      New if() to add the id or the shortname to the regexp, the same process backup_plan_dbops::get_default_backup_filename() does, by Lorenzo Nicora. Another way to get the regexp could be calling backup_plan_dbops::get_default_backup_filename() and hacking it's return to remove the last -*, but IMO this alternative is more tricky

      Show
      New if() to add the id or the shortname to the regexp, the same process backup_plan_dbops::get_default_backup_filename() does, by Lorenzo Nicora. Another way to get the regexp could be calling backup_plan_dbops::get_default_backup_filename() and hacking it's return to remove the last -*, but IMO this alternative is more tricky
    • Hide

      These testing instructions includes the execution of automated backups, so less courses = faster automated backup

      1.- Enable automated backups with this setting:
      .backup_auto_active to 'manual'
      .backup_auto_storage to 'Specified directory for automated backups'
      .set backup_auto_destination wherever you want
      .backup_auto_keep to '1'
      .check backup_shortname
      2.- Execute "sudo -u www-data /usr/bin/php admin/cli/automated_backups.php" from the command line
      2.- Execute again "sudo -u www-data /usr/bin/php admin/cli/automated_backups.php" from the command line
      3.- Check backup_auto_directory folder, there SHOULD be just one backup file per course

      Show
      These testing instructions includes the execution of automated backups, so less courses = faster automated backup 1.- Enable automated backups with this setting: .backup_auto_active to 'manual' .backup_auto_storage to 'Specified directory for automated backups' .set backup_auto_destination wherever you want .backup_auto_keep to '1' .check backup_shortname 2.- Execute "sudo -u www-data /usr/bin/php admin/cli/automated_backups.php" from the command line 2.- Execute again "sudo -u www-data /usr/bin/php admin/cli/automated_backups.php" from the command line 3.- Check backup_auto_directory folder, there SHOULD be just one backup file per course

      In my moodle, automated backups are set as follow:

      • Storage: specified directory of local filesystem
      • backup_auto_keep: 1
      • Course names are used in backup filename
      • Backups include everything, except logs and histories
      • Backup logs lifetime: 7 days

      After installed version 2.2.3, and set to use course names in filename and backuplog lifetime, old backups files are not deleted from filesystem, although keep is 1, old backups stay there forever.

            dmonllao David Monllaó
            mazzar Riccardo Mazza (Inactive)
            Ankit Agarwal Ankit Agarwal
            Sam Hemelryk Sam Hemelryk
            Adrian Greeve Adrian Greeve
            Votes:
            6 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved:

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