Moodle

Cron backup issues

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Trivial 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']) {

Issue Links

Activity

Hide
Dan Marsden added a comment -

this has already been fixed in MDL-10721and, MDL-13183 will prevent it from happening again.

Dan

Show
Dan Marsden added a comment - this has already been fixed in MDL-10721and, MDL-13183 will prevent it from happening again. Dan

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: