SCHEDULED Backup not working

SCHEDULED Backup not working

by joshy j -
Number of replies: 14
If I back up a specific course manually from within the course, I can locate the zip file within moodledata/x/backupdata folder, but when I set up automatic backups using Admin>Courses>Backups, the files are not created.
Average of ratings: -
In reply to joshy j

Re: SCHEDULED Backup not working

by Gerald Grow -
I have the same situation with two courses that are fairly large. I notice that, when I back them up manually from within the course, the backup takes a long time, but it works.

I'm guessing that the server cancels the backup if it doesn't finish within a certain time limit.
In reply to Gerald Grow

Re: SCHEDULED Backup not working

by Tiffany Morgan -
Same thing here. Where you able to make an adjustment in the Moodle Admin or at the server itself that would allow more time?
In reply to Tiffany Morgan

Re: SCHEDULED Backup not working

by Ravishankar Somasundaram -
Dear moodlers,

this is a common problem, to narrow down the problem source, the first thing you need to try out it "max_execution_time" time in php.ini file.

Increase to your required time level, or give it 0 so that it will not limit a script from being executed to a given time interval.


In reply to Ravishankar Somasundaram

Re: SCHEDULED Backup not working

by Julie Mohr -
Tried modifying the php.ini file with max_execution_time = 0 and it did not work.
In reply to Julie Mohr

Re: SCHEDULED Backup not working

by Ravishankar Somasundaram -
Dear Julie,

Did you restart apache after changing it ? If yes can some information on what is happening would really help me to help you.

what is the information you get when you try to backup having changed your execution time in php.ini ?


In reply to Ravishankar Somasundaram

Re: SCHEDULED Backup not working

by Julie Mohr -
I'm running Moodle in a hosted environment on a shared server. Is it possible to do that in this scenario? I only have access to Shell, SQL settings and my Moodle install. So far all that I have been able to do is install Moodle, link it to the SQL database using php and then set up the CRON using the shell. Other than that, I don't believe I have access to restart services that are probably being utilized by more than one hosted solution on the shared server.

As for the second part of your question. I created the backup folder in the course (thinking maybe it wasn't there and maybe that was the issue). I deleted all the temp files (these were quite large because it is a big class). There were four failed attempts at a backup in the temp folder. I ran it again and again it went to the same place where it was creating the zip and the web page showed me that the job was done (via the status in FireFox) but again I did not get the continue button at the bottom like I did on the other classes.

Let me know what else you need to know to help. I will upgrade one way or another soon as I must do this between classes which start again in January. But at this point, I believe that this issue has to do with the size of the class and the large number of files (although no single file is greater than 8MB the overall size of the class is much larger than the other courses).

Julie
In reply to Julie Mohr

Re: SCHEDULED Backup not working

by Ravishankar Somasundaram -
Dear Julie,

I would like to know how did you change the php setting for max_execution_time, and how did you confirm the same ?

You may also need to look at memory_limit setting as backup process consumes more of it.

Because that you people are able to backup the same course manually am assuming there's no problem with your zip binaries,

And yes, you need to request your administrator to restart the service for you.

Apart from these, i think what you mean by saying this

As for the second part of your question. I created the backup folder in the course (thinking maybe it wasn't there and maybe that was the issue). I deleted all the temp files (these were quite large because it is a big class). There were four failed attempts at a backup in the temp folder. I ran it again and again it went to the same place where it was creating the zip and the web page showed me that the job was done (via the status in FireFox) but again I did not get the continue button at the bottom like I did on the other classes.

is related to setting up your backup path, which you can do in Site Administration->Course -> Backup -> path.

but what ever you do please bare in mind to turn on debugging to developer mode and then go ahead with your intended actions, so that you get the true picture of errors and their source.

and if you can tell us what error you get it will be very helpful to isolate your problem.
In reply to Ravishankar Somasundaram

Re: SCHEDULED Backup not working

by Julie Mohr -
Thank you very much for your help on this issue. I knew I would not have any luck getting my service provider to restart Apache. They are very difficult to work with and my thoughts in the future are to move to a different hosting service (one that understands the needs of Moodle).

However, another post did suggest using the zip tool and changing the URL for the zip tool in the admin>server>system paths. It took me a while to remember how to login to the Shell, but I did just as the article stated, determined what the path was and updated it in my Moodle installation and it worked.

Thank you for your assistance.

Julie
In reply to Julie Mohr

Re: SCHEDULED Backup not working

by Ravishankar Somasundaram -
Dear Julie,

Because that you people are able to backup the same course manually am assuming there's no problem with your zip binaries,

Anyways, nice that you made it work.


~ ~ ~ Peace - Ravishankar Somasundaram ~ ~ ~
In reply to Ravishankar Somasundaram

Re: SCHEDULED Backup not working

by Julie Mohr -
Ravishankar,

I am sure that it had everything to do with the settings. Essentially the zip failed due to the time it was taking to create the zip and the limitations set in the settings file. But by using the zip tool on the server itself, something that would take less time to do, it was able to complete within the settings established within Moodle. I checked the zip file and it was fine.

I am currently hosing with 1and1 and getting them to do anything with the server is nearly impossible. I knew that I couldn't get them to restart Apache without a lot of pain on my end. So the only way to go at this was to explore everything I could do from my end. I just wish I could have found the KB article first without bothering everyone here with a documented issue.

The good news is, I was able to upgrade to 1.9.7 last night without a hitch including backing up the courses, data and the SQL database. Thanks again for your help.

Best wishes for 2010!

Julie
In reply to Julie Mohr

Re: SCHEDULED Backup not working

by Ravishankar Somasundaram -
Dear Julie,

Congratulations on the migration, Wishing you all the very best for 2010.

~ ~ ~ Peace - Ravishankar Somasundaram ~ ~ ~
In reply to Ravishankar Somasundaram

Re: SCHEDULED Backup not working

by Tiffany Morgan -
Finally got mine to work!

Here are the steps I went through (basically trial and error)
1. Cleaned up old files to make the courses smaller (didnt fix)
2. Removed old backups (didnt fix)
3. Changed Administration > Security > Site policies > Maximum uploaded file size to Server Limit (didnt fix)
4. Adjusted the max_execution_time in php.ini to 5 minutes (didnt work)
5. Reverted max_execution_time to 20 minutes (didnt work)
6. Reset the max_execution_time back to default and increased the memory limit in php.ini to 128M (didnt work).
7. Increased memory limit to 256M - SUCCESS!!

Thanks for the help everyone smile

In reply to Tiffany Morgan

Re: SCHEDULED Backup not working

by Ravishankar Somasundaram -
Dear Tiffany,

Good to hear that, Happy that i was of help to you.

Wishing you the best in 2010.


~ ~ ~ Peace - Ravishankar Somasundaram ~ ~ ~
In reply to Tiffany Morgan

Re: SCHEDULED Backup not working

by Brian Gray -
Both the execution time and the memory limit are reset in the file:

/moodle/backup/backup.php

(near line 122 on my installation - 1.97+).

I'm not sure how those statements interact with the values set in php.ini.

I'm having the same problems with my largest courses. A course backup that I ran on just one of these large courses created a ZIP file that is 618MB. (Lots of video and audio files...)

I've changed the values in both php.ini and in backup.php (6000 seconds and 256MB) to see what happens. If I can get it to work, I'll start reducing some of the numbers to see what really fixed it.