'Error' message when running scheduled backups

'Error' message when running scheduled backups

by Chris Lamb -
Number of replies: 3

I'm trying to schedule backups of complete Moodle sites, and for some reason it's not working, and I have no idea why not because I have very little information to go on!

I actually administer about 14 separate Moodles, all on the same Windows server.  I've set up a backup schedule for the whole of each Moodle site in Administration » Configuration » Backup, and created the necessary folder to save the file into and entered its path at the bottom of the page. 

When I try to run the backup, however, in the log file I get a page of lines like this (only the first line is shown - all the others show the same error):

CourseTime takenStatusNext
TLC Moodle1 Jan, 00:00- 1 Jan, 00:00Error3 Jun, 00:00

The error message tells me absolutely nothing, so I've been experimenting to see if I can fix it.  From searching these forums it looked like the most likely reason was permissions on the destination folder, so I've given 'Everyone' complete control of the folder (highly insecure I know, but guaranteed to remove permissions problems!), and it still didn't work.  I've tried leaving the folder path box blank so it will save it where it wants to save it, and it still doesn't work, though if I do a manual course backup it saves the zip file quite happily.

I know there's very little information to go on, but does anyone have any ideas what the problem could be?  Does Moodle keep any other logs that might tell me what's actually happening?  I've tried turning debugging on, but as I'm not running the backup script directly in my browser I don't get to see any messages that might be generated - can I launch the script directly in my browser so I can see any output it generates, and if so, which script is it please?

I'd be grateful for any ideas of what might be wrong, or suggestions for debugging - if I can get Moodle to tell me exactly what's wrong I can fix it, but 'Error' tells me nothing!

TIA

Chris

Average of ratings: -
In reply to Chris Lamb

Re: 'Error' message when running scheduled backups

by Anil Kumar -

I am also facing the same problem , Could you pls assist us ??????

In reply to Chris Lamb

Re: 'Error' message when running scheduled backups

by Chris Lamb -

Answering my own question, I *think* I may have accidentally solved it.

To try and make the first cron that ran trigger the backups I set the time to a few minutes in the past.  The backup tries to run when you click the 'Save' button, but for some reason it always fails and leaves the error messages, but it resets the time for the next backup to tomorrow.

When I set the time for the first backup to be a few minutes in the future, the backup triggered by the 'Save' button failed, as usual, but then the cron job picked it up when it got to the scheduled time, and executed it correctly.  The zip files were created, the schedule reset to tomorrow, and the email sent to me to confirm that it had worked.

It will be interesting to see if the ones that failed earlier work when the cron runs on Monday.

Incidentally, if you run the cron script directly in a browser you get a page or reults telling you what it's done.  Are those results kept in a logfile anywhere?  If so, where is it, please - I can't find it!

Chris

In reply to Chris Lamb

Re: 'Error' message when running scheduled backups

by Kathy Mohr -
Hi Chris,

I too have been experiencing problems both with backing up individual courses and the entire site. I tried your strategy above but with no success. I've also check and rechecked the directory privileges but can't find any issues there.

I am running two instances of Moodle on the same server. One is backing up just fine but the other is not. Will running two Moodle sites on the same server cause any issues?