Some scheduled backups fail every time

Some scheduled backups fail every time

by Chris Lamb -
Number of replies: 0

I have a problem with scheduled backups in Moodle 1.5 - I've tried everything I can think of to fix it without success, and it's driving me mad!

We have 16 separate Moodle installations running on one server, and between them they currently contain 201 courses.  They're all scheduled to back up overnight when it's quiet (they're triggered by Cron at half-hourly intervals, so they're not all trying to back up at the same time).

For some reason I can't get the backups to run at more than about 95% success rate - for example last night out of the 201 courses 10 failed to complete.  Some of the failures are random, a different course in one Moodle might fail on different nights.  (Out of the 16 Moodles 9 worked fine last night.)  That's fair enough, I know that some failures are inevitable, so I've got all the backups set to keep the previous five nights' zip files, so if something fails tonight I can pick it up from last night's backup if I need to.

What's concerning me, though, is that some of the courses never back up properly.  For example, one of the Moodles only has 7 courses at the moment, but 2 of them have never backed up since I set the schedule up at the beginning of June.  Each course fails at the same point each night - one always fails on 'Messages', one always fails on 'calculating user files'.

I've tried everything I can think of to fix this - I've defragmented the drive on the server, I've repaired all the database tables using the repair feature in phpMyAdmin, I've changed where the zip file should be saved (although it doesn't seem to be getting as far as trying to create the zip file), but nothing works.  For some strange reason, though, if I trigger a course backup manually from within Moodle it works fine, it only fails when it's run on the schedule.  It can't be because there's so much stuff to back up that the script times out, because one course, for example, when I back it up manually produces a zip file of only 73KB.

I have no idea what's causing this continued failure of certain courses, nor why a manual backup works but a scheduled one doesn't.  Has anyone got any ideas what could be the problem or what else I could try, please?

Thanks

Chris

Average of ratings: -