Backup and restore

Memory limit for backup

This discussion has been locked because a year has elapsed since the last post. Please start a new discussion topic.
Picture of Ivan Belotelov
Memory limit for backup
I'm running moodle site on FreeBSD server. Some of courses are pretty
large - up to 300Mb (mainly becouse of file resourses).
I was never able to compleet backup for these big couses - data transfer
ends in few seconds after retrieving  of admin/cron.php . There was an
advise to use brawsers with long timeout. I  have tested some  - IE, Mozilla
(under Win, Linux and BSD), Konquerrior.
Finnaly I have found that it is possible to specify timeout manually for wget with "-T" option,
and  "wget -T0" should run wget without timout at all. But unfortunatelly it does not help - I
still was not able to compleet backup process. So the problen was not (not only) in client
While I was experimenting with different brawsers,  I have found that my moodledata/temp
are overfulled with some bachup files, I assume it is some temporary files of backup and should be deleted automatically in case of successfull backup, but remains there if backup

At the end I explore moodle/admin/cron.php (I'm not a php expert at all), and found this line:

I increase memory limit here to 560M and after that I already make some successful backups. So this is probably solution for some problems with backup.

Average of ratings: -
Picture of Boyd Mitchell
Re: Memory limit for backup

I believe you are right.  I am also having the same issue.  I have my limit set to 100mb and a course with slightly more than 100mb worth of files will not backup.  When i get rid of a lot of the files.... backup works just fine.  And the resulting zips always end up being smaller than the upload limit.

I do not like this tho.  Some of my schools courses are getting larger by the second.  And I will not be able to do this for all of them.

I wish there was a way to specify a "No Limit" on backups.


Average of ratings: -
One poor developer...
Re: Memory limit for backup
Group Core developersGroup Documentation writersGroup Moodle HQGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

this issue is commented in

The problem seems to be the pclzip library, eating a lot of memory, exactly it needs to store all the "zip" file in memory... sad

After finishing another tasks, I try to find some workarround for this problem. It's documented in Bug 1222 and it will be updated here...

Thanks for your report...

Ciao smile
Average of ratings: -