## General help

### HTTP 500 error after Backup/Restore

Re: HTTP 500 error after Backup/Restore

Well, guess I missed 'already upgraded to 3.0.9 ...' ... which is also still behind and no longer getting fixes and updates for anything ... but you know that.

I do re-call there being issues with certain role conflcts (superuser/course creator?) on restores, but not on backups - and not error 500's.

Windows systems use 'Administrator' as super user ... there is a config.php line that dictates 'admin' in Moodle being admin in moodle ... supposedly not to confuse WinDoze whose system admin might have changed 'Administrator' to 'admin'.
$CFG->admin = 'admin'; Dunno if that would be a factor or not ... again ... don't do Windoze. Approach to backing up .... check to see who on the system has superuser/admin rights. Write them down. Go into troubled courses. See if those users are also assigned as course creators or Teachers in the course. Remove those users .... leaving only the students. Try a backup. What are you using for authentication? On Windoze would assume LDAP. Are there any users in troubled courses that are authenticating with something other than LDAP? Moodle either does all users or none ... nothing in between - no user select list. IF one can get a .mbz backup and restore fails ... might be due to roll conflict. I've had to un-gizip an old backup, edit users.xml removing the user ID'd as having a conflicting role (Moodle doesn't tell you which user ... just that there is a role conflict), then re-gzipped the backup making sure moodle_backup.xml is at the root of the gzip compressed file. Then, and only then, would the course restore. Still however, that situation didn't throw a 500 error. ????? what happens if you make a no user ... no students no work no assignments no files ... no teacher ... backup of a troubled course? What addons do you have installed? Am nearing ropes end here and some of what I might suggest just might send you down a rabbit hole ... illusive 'wabbit' (Elmer Fudd here). Shame shame on Windows experts in these forums. 'spirit of sharing', Ken 'spirit of sharing', Ken Average of ratings: - Re: HTTP 500 error after Backup/Restore Hello again. Sorry for the delay. I've gotten sidetracked. 1) v.3.0.9 is the present version in use and plans to modernize again will commence in the near future. 2) The$CFG->admin variable has never changed from 'admin' and I don't suspect this would be the cause of the problem as other errors would likely have appeared prior to this backup problem.

3) Yes, we are using LDAP on this site for login authentication. I will investigate whether this has any effect on enrolled users in courses during the backup process.

4) A troubled course will successfully backup if I remove the 'Include enrolled users' setting during the backup initial settings page. All other settings are inconsequential.

Thank you again.

Average of ratings: -
Re: HTTP 500 error after Backup/Restore

Hello again,

I've gotten side-tracked again but I've been able to give Moodle some more attention today.

Since the 'Include Enrolled Users' checkbox is a factor here for the success or failure of a backup, which tables in particular are being included in this backup? This way I can run some queries to better identify where specifically this user data is faulting the backup process.

I have discussed LDAP as a possible factor in this situation and we're in the middle of devising some action to investigate this further. This could possibly lead to disabling LDAP-based user accounts and see if this has any effect in getting proper course backups.

Thanks.

Average of ratings: -
Re: HTTP 500 error after Backup/Restore

Will say this ... you are relentless! (compliment) .... not sure that you'll find fault with what the tables for logs contain for users or there would be other issues present.

Having said that, the issue really might be too much data per user might be causing this issue.

Anyhoo,

SHOW COLUMNS FROM mytable FROM mydb;
is a MySQL 5.7 command to show really how a table is structured ... column names/attributes.

So if using MySQL plugin your DB replacing mydb above and take a gander at:

﻿mysql> show tables like '%log%';

which will output more than one table but the two to view are: mdl_log and mdl_logstore_standard_log

You might want to get a heavy user ID so you can query the last table above to see just how many entries there are for just one heavy user.

OR you could add the code suggested to skip course ID 1. ;)

'spirit of sharing', Ken

Average of ratings: -
Re: HTTP 500 error after Backup/Restore

Hi again,

I've looked at the log and storage tables and they are indeed large but not so large that I would expect them to interfere with the backups here. I've adjusted the php.ini file to provide additional variable handling but this doesn't seem to do the trick. Any other ways we can increase the volume of user data into these backups?

Thanks again.

Average of ratings: -
Re: HTTP 500 error after Backup/Restore

Hi again,

There are many logs to view here (hundreds of thousands) and I've looked at increasing my PHP variable limit but to no avail.

Average of ratings: -