backups very slow

backups very slow

by Thomas Haynes -
Number of replies: 6
Greetings...

I am running Moodle 1.6.1+ (2006050512) on a WIMP (2003 - IIS6) server. I am using PHP 5.1.2 and MySQL 5.0.22

My automated backups are REALLY slow. Each course takes about 25 minutes. If I backup a course online, it is much quicker (like a minute or two).

I am using php.exe from the Scheduled Tasks with the command

C:\php\php.exe -c c:\php\php.ini c:\Inetpub\wwwroot\moodle\admin\cron.php


At this point, I have about 78 courses, and so the automated backup takes longer than a day to complete. During this time my php process in the task manager takes about 25% of the cpu. Since this is a dual 2.8 GHz Xeon, that is a lot of cpu cycles to consume.

Does anyone have a suggestion here?

Regards...   Tom
Average of ratings: -
In reply to Thomas Haynes

Re: backups very slow

by Thomas Haynes -
Thinking that perhaps the problem here was running the script from the command line in the Scheduled Tasks, I have disabled the Task and am instead triggering the cron.php from a cron job on a Linux server I manage.

I am still seeing automated backups at the rate of about one every 25 minutes.

Have any ideas here?
In reply to Thomas Haynes

Re: backups very slow

by Bob Eadie -

I'm getting the same sort of problem.  We run CRON every 10 minutes, and about the second or third time it runs, the w3wp process hogs the processor - for ever.

When backing up (overnight) it now takes over a day like yours.

Detailed investigation (view the detailed backup log of a particular course) shows that when it gets to Phase 2: Executing and copying . . then the 'user info' section is taking MINUTES.  3 mins is the shortest, and some courses are taking 20 mins. for just this stage . . .

Any suggestions why?  We are using LDAP authentication to Windows AD, and enrolling students via a flat file import.

Bob Eadie

In reply to Bob Eadie

Re: backups very slow

by M Gardner -
something very strange happened during the 1.6 upgrade.
Backups are very slow via cron, yet work fine if done manually.
I've raised it on several threads however I'm afraid no answers have been provided.

I think moodle is great however, I do feel let down by the moodle community here.

I've a big system and the 1.6 rollout has resulted in nightly backups not working as they should.

In reply to M Gardner

Re: backups very slow

by Bob Eadie -

I too have been posting on several threads . .

After hours of investigation, I traced it (on our system) to backing up of USER info.  I would suggest firstly trying to backup NO user info.  Then add some back in if it goes OK.

There is backup modules 'with user data' . .

Then backup Users 'ALL' or just 'Course' (I think this was the key for us!)

Then backup User Files yes/no.

Try with the minimum possible, and see if it helps.  I KNOW it was the secret of getting our system back into working order.  Hope it might help you too.

Bob

In reply to M Gardner

Re: backups very slow

by Timothy Takemoto -

Dear M. Garnder, Bob Eadie

I can see no reason why manual should be quicker/more reliable than cron.

But, I found the same thing to happen. Bob posted that user data was thing that is taking the time, so I tried a manual backup to see where my backups were failing, but when I did it manually the backup went fine.

My interpretation was that at the time when the cron fired (at 4am) some other software was also making backups and so there was likely to have been increased load on the server. I have changed the time to 6am and the backups seem to have worked (but they continue executing till about 9 am)

I think that I need userdata to store quiz attempts, so leaving userdata out of the backup is not realy an option.

I know that one moodle hosting provider (a moodle partner) does not allow course backups but instead dumps the databases every night since that uses less processor power. Is this the way to go? 

My backup files are about 5.5MB full of a lot of quiz attempts, and take about 30 minutes to create. It would be nice to have a separate server to make backups.

Timothy

In reply to Timothy Takemoto

Re: backups very slow

by M Gardner -
thank you for replies.

My worry about database backups is what happens if you only need to restore only one course? (perhaps a new teacher has messed something up and it needs to be restored to how it was) Course backups via cron enabled this. It is better than nothing (and thankfully we do have this activated)

I think it's a shame that this useful feature is not working and what is more, it is not being reconigised by moodle-guru's

Thanks
Malc.