Automated backup Faiing

Automated backup Faiing

by Peter Goldsmith -
Number of replies: 11

Hi Has any body had this?

Automated backup fails on one course the log shows :-

Status - Unfinished
3:07:18 AM - instantiating backup controller e9fefb6ab336cb3e132310cc35b2b027
3:07:18 AM - setting controller status to 100
3:07:18 AM - loading controller plan
3:07:19 AM - setting controller status to 300
3:07:19 AM - applying plan defaults
3:07:19 AM - setting controller status to 400
3:07:19 AM - setting file inclusion to 1
3:07:19 AM - checking plan security
3:07:19 AM - setting controller status to 700
3:07:19 AM - saving controller to db
3:07:19 AM - calculating controller checksum 187b94f58f734852065c76023bd6ec3e
3:07:19 AM - loading controller from db
3:07:19 AM - setting controller status to 700
3:07:19 AM - saving controller to db
3:07:19 AM - calculating controller checksum 0ce4cd12dad61c166dfc95056e7f4395
3:07:19 AM - loading controller from db
3:07:19 AM - setting controller status to 800
3:29:35 AM - backup_auto_failed_on_course Dip1 2017/18
3:29:35 AM - Exception: storedfilecannotcreatefile


any help appreciated.


Peter

Average of ratings: -
In reply to Peter Goldsmith

Re: Automated backup Faiing

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hard drive full?

In reply to Emma Richardson

Re: Automated backup Faiing

by Peter Goldsmith -

Hi Emma,


Thank you for the reply. That was my initial thought but loads of space. I have checked permissions etc but still the same. Odd as other courses are fine but this one fails, it is the biggest. I might change the backup location and see if I get the same issue.


Thank you


Peter

In reply to Peter Goldsmith

Re: Automated backup Faiing

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

It could also be hitting a timeout somewhere - you might check php.ini for timeout settings and raise them up to see if that helps.  

Also, try running that course manually from cli and see if it gives you any better messages...

In reply to Emma Richardson

Re: Automated backup Faiing

by Peter Goldsmith -

Thank you, Today has been to busy but I will try over the weekend. I will let you know.


Peter

In reply to Peter Goldsmith

Re: Automated backup Faiing

by Ken Task -
Picture of Particularly helpful Moodlers

Pardon jumping in here ...

Think this is key/clue:

Exception: storedfilecannotcreatefile

Status 800 is short of 900 and 1000 - 1000 normally reached when backup is successful.

Check apache error logs ... do you see a 'Server has gone away' error?

If so that's due to max_packets_allowed setting too low (default is 16M).

Refer:

https://dev.mysql.com/doc/refman/5.7/en/program-variables.html

Add a line to my.cnf under [mysqld] section of config file:

max_allowed_packet=32M
Restart MySQL service.

The other to check, since you've said it's a large course, is the settings in php for time for a script to run.  Default is normally 30 might want to increase that to 60 or 90.   Restart apache.

Also check moodledata/temp/backup/ for any files/folders left over from failed backups.   Can manually remove the contents of moodledata/temp/backup/ with no ill affects.

There is a clean up task to check as well - which is supposed to execute when cron job is run to clear out that temp area.   Running automated backups that task needs to complete successfully or one could 'run out of space' (eventually).

That to say .... cron job needs to run frequently.

All the above 'educated guesses' having had deal with a site that had 1 130+ Gig course when backed up and autobackups could never really finish.


'spirit of sharing', Ken



In reply to Ken Task

Re: Automated backup Faiing

by Peter Goldsmith -

Thank you Ken, to busy today but will see if I can find some time over the weekend. I will let you know what happens.


Peter

In reply to Ken Task

Re: Automated backup Faiing

by Peter Goldsmith -

Hi Ken,


I can only find this in the my.cnf file

[mysqld]
datadir=E:/data
port=3306
sql_mode="STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION"
default_storage_engine=innodb
innodb_buffer_pool_size=8000M
innodb_log_file_size=50M
character-set-server=utf8
[client]
port=3306


Not much so I guess a lot is loading as default. if this looks correct I will edit it and restart IIS. I guess I should have mentioned its a Windows Server running IIS. The PHP settings are at 60 for the script so maybe ok. Yes there is a lot (175gb) in the moodledata/temp/backup/ folder so if its safe to remove that lot I will

Thank you for helping a newbie


Peter

In reply to Peter Goldsmith

Re: Automated backup Faiing

by Ken Task -
Picture of Particularly helpful Moodlers

Am not a Windows person but assume most settings in my.cnf would apply across platforms.

Yes, safe to remove manually from moodledata/temp/backup/ but that should probably be last resort.   There are three tables that track autobackups and a 'task' for cleaning up in moodlecode/admin/tool/task/cli/ or the Gui Admin interface.   Those 'task' are run by cron so run your cron and get not only the files cleaned up but those tables tracking up to date with current/correct information.   Might have to run cron several times to catch up.

Probably need to take care of the situation as soon as possible for the longer things fester the worse it could get.

'spirit of sharing', Ken


In reply to Ken Task

Re: Automated backup Faiing

by Peter Goldsmith -

Hi Ken,


The backup still fails with the same error and the controller count stops at 800. Units that succeed go to 1000. Is there any value in increasing to above 32mb memory is not an issue as we have 32gb in the server.


Kind regards


Peter

In reply to Peter Goldsmith

Re: Automated backup Faiing

by Ken Task -
Picture of Particularly helpful Moodlers

Well, if logs still show 'Server Gone Away', and you have the memory to do it, bump it up to something higher than 32M .... you could do that a chunk at a time or double it ... 64M - that might push the server into using SWAP space some, but ....

What ever server is doing at 800->900 it's a lot! :\

'spirit of sharing', Ken