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

Automated course backup function duplicates and does not delete old versions when saved to non-default location

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0.2
    • Component/s: Backup
    • Environment:
      LAMP, Moodle 2.0 build 20101125
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      Following may (not) be a bug - uncertain if function behaviour is intended.

      Automated course backup function duplicates course backups, does not remove old course versions when saveto destination is not the course default dir and does not skip hidden courses.

      to replicate,

      1. login as admin
      2. go to Home > Settings block > Course > Backups > Automated backup setup or http://yourmoodle.com/admin/settings.php?section=automated
      3. use follow settings

      Active: Enabled
      Schedule: Monday
      Execute at: 00
      Automated backup storage: Specified directory for automated backups
      Save to: path something like /home/directoryoutsidewebroot
      Keep: 1

      4. save changes
      5. wait period for automated course backups to run, then go to saveto directory specified above; note multiple versions of each course backup.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            dmz Daniel M. Zimmerman added a comment -

            This happens to me too, and is not minor, as it rapidly fills the disk and causes the site to not work any more. The only workaround at the moment seems to be to only back up to the "course backup area" (wherever that is - seems pretty impossible to find on disk, which means no straightforward backups can be made of the course backup files).

            Show
            dmz Daniel M. Zimmerman added a comment - This happens to me too, and is not minor, as it rapidly fills the disk and causes the site to not work any more. The only workaround at the moment seems to be to only back up to the "course backup area" (wherever that is - seems pretty impossible to find on disk, which means no straightforward backups can be made of the course backup files).
            Hide
            tsala Helen Foster added a comment -

            Chad, thanks for your report and Daniel, thanks for your feedback. Increasing priority to critical and hoping that the issue can be investigated soon.

            Show
            tsala Helen Foster added a comment - Chad, thanks for your report and Daniel, thanks for your feedback. Increasing priority to critical and hoping that the issue can be investigated soon.
            Hide
            trednie Tim Ednie added a comment -

            Also happening to me. And another vote for it not being minor, glad to see it was elevated. I just got backups working after an upgrade issue.

            Show
            trednie Tim Ednie added a comment - Also happening to me. And another vote for it not being minor, glad to see it was elevated. I just got backups working after an upgrade issue.
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Uhm... silly questions for Chad, Daniel, Tim...:

            1) Can you paste here one example of how your backup files are named?
            2) Can you tell me which is the default language in your site? And the admin one?

            Ciao

            PS: The rationale for these questions is that I've been running it here and seems to work perfectly, keeping the desired number of copies and one of my immediate concerns were about the names not being the expected. I continue investigating trying to reproduce it here.

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Uhm... silly questions for Chad, Daniel, Tim...: 1) Can you paste here one example of how your backup files are named? 2) Can you tell me which is the default language in your site? And the admin one? Ciao PS: The rationale for these questions is that I've been running it here and seems to work perfectly, keeping the desired number of copies and one of my immediate concerns were about the names not being the expected. I continue investigating trying to reproduce it here.
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Aha, I think I've found it!

            When backup files are stored within Moodle, they are named:

            backup-format-type-shortname-date-time[-annonymous|nousers].mbz

            but, when stored out from Moodle (real filesystem), the shortname above is replaced by the courseid, to avoid problems with non-ascii charaters. And if I'm not wrong, that replacement is the one causing to have some filenames ending with [-.mbz] that aren't processed properly by the eraser.

            Stay tuned... ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Aha, I think I've found it! When backup files are stored within Moodle, they are named: backup-format-type-shortname-date-time [-annonymous|nousers] .mbz but, when stored out from Moodle (real filesystem), the shortname above is replaced by the courseid, to avoid problems with non-ascii charaters. And if I'm not wrong, that replacement is the one causing to have some filenames ending with [-.mbz] that aren't processed properly by the eraser. Stay tuned... ciao
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            I've created one request for integration of this @ PULL-298.

            Hopefully, if review / testing are ok, it will land to upstreams next Wednesday.

            Thanks for the report, ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - I've created one request for integration of this @ PULL-298. Hopefully, if review / testing are ok, it will land to upstreams next Wednesday. Thanks for the report, ciao
            Hide
            tsala Helen Foster added a comment -

            Confirming that this issue is fixed in the latest 2.0.1+ weekly.

            Show
            tsala Helen Foster added a comment - Confirming that this issue is fixed in the latest 2.0.1+ weekly.

              People

              • Votes:
                3 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  21/Feb/11