Copying Production Moodledata to Dev Brought Down Production.

Re: Copying Production Moodledata to Dev Brought Down Production.

by Jeff White -
Number of replies: 2
Hi Visvanath, 


I am still researching the cause but I did discover a mistake I made when I was copying over the moodledata, I left the cron job running but as I had the climaintenance.html the dev's moodledata. That would be fine when the climaintenance is there in moodledata as you will just see a

CLI maintenance mode active, cron execution suspended.
on the cron logs but when I did the rsync that file went away in dev which made the cron jobs run fully. OOPS. I am not sure if the cron job running during the copy (something you should never do) caused things to start getting pushed to production but it is a possibility if something in moodledata pointed to the production instance. 

For clarification on the just copying the moodledata. 

I was only copying what was in $CFG->dataroot. I keep the Moodle application code in a different directory from moodledata. So the config.php, that has all those settings, was not be part of the copy, unless it was in the caching. I did see a directory called moodledata/MUC/config.php which has a mess of things in there but nothing that says points to specific servers. 

In reply to Jeff White

Re: Copying Production Moodledata to Dev Brought Down Production.

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi Jeff

It may be late, nevertheless did you see this: "Multiple installation of Moodle on the same server are overriding the admin settings. Version 2.9+" https://moodle.org/mod/forum/discuss.php?d=328221 ?
Average of ratings: Useful (1)
In reply to Visvanath Ratnaweera

Re: Copying Production Moodledata to Dev Brought Down Production.

by Jeff White -

Thanks for pointing out this forum post Visvanath. Looks like someone else was suspicious of that moodledata/muc/config.php file. I find it interesting that this occurred with my newly built environment that uses memcache and never had issue with any of my other test instances. I guess we need to include deleting moodledata/muc folder during any upgrade or site migration in moodle docs

I am still trying to get the time to test this situation again with consistent results but I cant really do it in my current dev environment without risking my production instance. I cant really use the excuse "I am applying the scientific method!" if I knock out production again by reproducing the error. This error has yet to occur when i copy a out of the box moodle instance with memcache and a muc/config.php. It only has happened to my production instance. I had the idea of building a completely isolated LAMP cluster that has no ability to communicate with anything outside the cluster and an isolated client machine but that takes time and resources I do not have atm.