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

Cannot run multiple backups simultaneously with the same user and filename

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.0.4, 3.1
    • Fix Version/s: None
    • Component/s: Backup
    • Labels:
    • Affected Branches:
      MOODLE_30_STABLE, MOODLE_31_STABLE

      Description

      This is very difficult to test so I'm looking for some advice with this one!

      Essentially we do a few "rollovers" a year which backup 1250+ courses and restore them into a new Moodle installation.
      This year, with our fancy new beanstalk adhoc task queue thing, we have 32 processes on backup duty and 32 on restore.
      What we've noticed is a lot of failures when backing up in parallel like this, because the backup is running as MODE_GENERAL with no users, which sends the file to the user's backup folder (in this case "admin") and does so with an ID of 0. We get this:
      Task failed: Can not create file "5/user/backup/0/backup.mbz"

      I've "fixed" this by changing "itemid" to the context's ID, so each filename will be unique and therefore not conflict / can run in parallel.

      As for core Moodle, I'm not sure where this might be a problem but I don't see why itemid should be 0 so I'm hoping the fix makes sense anyway...

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              skylarkelty Skylar Kelty
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated: