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

Cron backup issues

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 1.6
    • Fix Version/s: 1.8.5, 1.9
    • Component/s: Backup
    • Labels:
      None
    • Environment:
      All
    • Database:
      Any
    • Affected Branches:
      MOODLE_16_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE

      Description

      It seems that when admin/cron.php creates an XML backup it leaves 3 areas which the manual backup includes in the XML.

      The modules do not seem to hold any data, The <mod> tag does not exist inside of <section>, and <instances> are missing from within the <mod>.

      I'm not sure if this is a bug or if it has been resolved already but here is my solution. If you replace these lines with the following code backups created with the cron should be identical to backups created through the manual backup procedures.

      Admin/cron.php line 23:

      $GLOBALS['cron'] = true;

      Backup/Backuplib.php

      line 528:

      if (!empty($object->backup) // $GLOBALS['cron']) {

      line 994:

      // empty($preferences->mods[$moduletype]>instances[$course_module[$tok]>instance]->backup)) // !$GLOBALS['cron']) {

      line 1668:

      if (!empty($object->backup) // $GLOBALS['cron']) {

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  3/Mar/08