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

Backup temp files too aggressively removed

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.4.10, 2.5.6, 2.6.3, 2.7
    • Fix Version/s: 2.6.4, 2.7.1
    • Component/s: Backup
    • Labels:
    • Testing Instructions:
      Hide
      1. Run a backup once, so that all directories are created.
      2. In a Mac or Linux shell (sorry)

        cd dataroot/temp/backup/
        touch 1 && touch -A -320000 1
        touch 2 && touch -t 201305140100 2
        chmod 777 1
        chmod 777 2
        

      3. The backup folder should now contain files 1 & 2
      4. Run a backup
      5. File 2 should now be gone
      6. In the shell, do

        touch 2 && touch -t 201305140100 2
        chmod 777 2
        

      7. You should now have files 1 and 2 again
      8. Run a restore
      9. File 2 should be gone
      Show
      Run a backup once, so that all directories are created. In a Mac or Linux shell (sorry) cd dataroot/temp/backup/ touch 1 && touch -A -320000 1 touch 2 && touch -t 201305140100 2 chmod 777 1 chmod 777 2 The backup folder should now contain files 1 & 2 Run a backup File 2 should now be gone In the shell, do touch 2 && touch -t 201305140100 2 chmod 777 2 You should now have files 1 and 2 again Run a restore File 2 should be gone
    • Affected Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE, MOODLE_27_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE, MOODLE_27_STABLE
    • Pull Master Branch:
      MDL-45714-master

      Description

      At a number of places in the backup and restore code, all temp/backup dirs/files are deleted after 4 hours. That means that if a user runs a restore (at T+0) that takes, lets say 6 hours, and another user starts or finishes a backup, or finishes a restore in the time from T+4h to T+6h, the first restore will fail because it's temporary files were removed in the interm.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  14/Jul/14