Moodle
  1. Moodle
  2. MDL-6280

Backup files should not be included in new backups

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.7
    • Fix Version/s: 1.6.3
    • Component/s: Backup
    • Labels:
      None
    • Environment:
      All
    • Database:
      Any
    • Affected Branches:
      MOODLE_17_STABLE
    • Fixed Branches:
      MOODLE_16_STABLE
    • Rank:
      33074

      Description

      When backups are set to save in the course folder and course backup files are included in new course backups. If a large enough number of backup files are kept (for example 20), then course sizes quickly grow to several gigabytes in size.

      In our particular case the client was then locked out of their account because they overloaded their quota.

      This was on a Moodle 1.6 install, but I believe impacts many versions of moodle.

        Activity

        Hide
        Martin Dougiamas added a comment -

        From Eloy Lafuente (stronk7 at moodle.org) Friday, 18 August 2006, 05:43 AM:

        Hi Jonathan,

        when you say, are set to save in the course folder I assume that you are generating such backups to the moodledata/1 directory. Is that correct?

        Anyway, it's near impossible to avoid such backup files from being included in next backups if they are inside the course_files directory (mainly because it's impossible to differentiate such .zip files from others that could be there on purpose).

        Two workarounds could be possible:

        1) Send backup files to another directory (outside from the moodledata/X ones).

        2) Send backup files to any directory called backupdata. Moodle automatically skips directories with that name.

        But, avoiding .zip files to be included isn't a good idea, IMO.

        Ciao

        Show
        Martin Dougiamas added a comment - From Eloy Lafuente (stronk7 at moodle.org) Friday, 18 August 2006, 05:43 AM: Hi Jonathan, when you say, are set to save in the course folder I assume that you are generating such backups to the moodledata/1 directory. Is that correct? Anyway, it's near impossible to avoid such backup files from being included in next backups if they are inside the course_files directory (mainly because it's impossible to differentiate such .zip files from others that could be there on purpose). Two workarounds could be possible: 1) Send backup files to another directory (outside from the moodledata/X ones). 2) Send backup files to any directory called backupdata. Moodle automatically skips directories with that name. But, avoiding .zip files to be included isn't a good idea, IMO. Ciao
        Hide
        Miroslav Fikar added a comment -

        Please, see forum discussion for another case: http://moodle.org/mod/forum/discuss.php?d=54155

        Our backups are within backupdata directory and after upgrade somewhere between 2006/08/30-2006/09/06 get included in the next backup. I have to stop periodic backups until the issue is resolved.

        Show
        Miroslav Fikar added a comment - Please, see forum discussion for another case: http://moodle.org/mod/forum/discuss.php?d=54155 Our backups are within backupdata directory and after upgrade somewhere between 2006/08/30-2006/09/06 get included in the next backup. I have to stop periodic backups until the issue is resolved.
        Hide
        Miroslav Fikar added a comment -

        I have come to some possible explanation, but I do not know, how to fix the bug. In our case, the issue is connected to a directory resource. A teacher can provide for students the whole Files area that includes both directories moddata and backupdata. For some reason, /moddata is correctly not visible in the resulting view, but /backupdata is. Thus, students can even download some backup. That is in my opinion not correct as backup contains all about the course, even thing that should be hidden for them.
        But what is worse, visibly the /backupdata directory gets involved in subsequent backups and thus the size of backups grows.
        My suggestion is to:

        • make /backupdata invisible for students
        • exclude under all circumstances /backupdata from backups.
        Show
        Miroslav Fikar added a comment - I have come to some possible explanation, but I do not know, how to fix the bug. In our case, the issue is connected to a directory resource. A teacher can provide for students the whole Files area that includes both directories moddata and backupdata. For some reason, /moddata is correctly not visible in the resulting view, but /backupdata is. Thus, students can even download some backup. That is in my opinion not correct as backup contains all about the course, even thing that should be hidden for them. But what is worse, visibly the /backupdata directory gets involved in subsequent backups and thus the size of backups grows. My suggestion is to: make /backupdata invisible for students exclude under all circumstances /backupdata from backups.
        Hide
        Petr Škoda added a comment -

        Should be rosolved in cvs, see commit comments

        Show
        Petr Škoda added a comment - Should be rosolved in cvs, see commit comments

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: