So 'wait a day' doesn't mean 'defeat' in the purpose of using git for core. Git update/upgrade will NOT popup a screen from a plugin with new settings for the admin to set/choose options, etc. The Moodle UI is 'best' (translate easiest) for updating plugins. The idea here is to use tools and use them for what they are best at. whatever works for you! One size doesn't fit all. You know, we could 'debate' this to death! The bottom line is. I am still interested in getting better with "git", so all of your posts are very helpful. It would be harder if I had 1000 to 50000 students. Of course, I run a small moodle with about 100 active students right now. I looked to see the last time any student was logged in, saw 30 minutes ago, and decided to update right then. For example, yesterday I did this in the middle of the day. I prep my new moodle, and my production site is only down for about 3 minutes. It takes me about 10 minutes to upgrade a site manually. Relative to these errors, what happens if one does get errors? Does this leave moodle in a state of not working? If so, then the solution is to restore from backup and try again (fixing problems first, or course.) Right?īeing an old timer, I don't want too much automation added. I would want to run git on my MAMP install first so that I could "watch for errors." I notice your "watch for errors" comment. What I always do is to upgrade my MAMP moodle first, just to take a look to make sure that everything looks good. With the "git" method, what does one do about addins? For example, in my case I am adding "Collapsed Topics" and two "Checklist" addins. I'd rather 'get 'er done' so I can go back to watching NFL games! ) Heck, for that matter, one could setup a cron job to run every 2 weeks and call that script. If a backup of the moodledata folder is also run at same time, then that's even longer. The longest I've seen the script run is just under 5 minutes and that was due to 2 things: git acquiring the new code/updates and the upgrading of the DB. Ī script (which could be run by the 'clients' either via command line or via a 'Custom Command' button in webmin is reliable, effiicient, saves $, saves time, etc. 'clients' don't want much downtime, 'clients' don't want it to be expensive. ever do an 'oops' in a drag an drop on a Mac? I have! :\).įor me (and those that I support - ie, 'clients'), it's a matter of time and expense. so there is nothing wrong (cept backups and the potential for 'human error'. Your method works and does follow Moodle directions for updating/upgrading. "" I'd like to upgrade the stuff easily with command lines. always recommended before one updates or did say. should be able to use browser now to log in and check things by going to Notifications.īackup of code folder and a mysql dump. Use chown to set all files/folders to appropriate user:group for Mac. If running the above under sudo, that might tag updated folders and files as belonging to you as the user. Make the script executable: chmod u+x update Php admin/cli/upgrade.php -non-interactive Mysqldump -u root -p moodle29 > /home/backup/moodle29db.sql Tar -cvf /home/backup/moodle29-data.tar /var/www/moodle29data This assumes that using php from command line such a below finds the correct version of PHP you've running the web service under. (change to your password and other things like paths/locations to fit your system) To set up an update script and use for future updates: Set the same owership/permissions on /var/www/htmlgit Let's say you have questionnaire addonįrom /var/ Now to get a copy of all the addons you have. Git branch -a should also show that Moodle29 is *'d Make sure you have the 29 version of code - this will eventually result in a minor/in-series upgrade for your current version. Git branch -track MOODLE_29_STABLE origin/MOODLE_29_STABLE We will install new code into htmlgit and eventually rename html to htmlold and htmlgit to html making it the new default web root. On linux (RHEL/CentOS flavored) where Moodle is the only app, that's typically /var/www/html (the html directory contains the moodle code. You have to translate locations and apply to your server.Ĭhange to the directory where you can see the moodle code folder. While the following is specific to a RHEL/CentOS server as far as locations of folders/directories, the commands should work under sudo for Mac. The following works on linux and will work on mac. One cannot get a Moodle under git in an existing/functioning moodle code directory (well, ya can, but it's not 'pretty'). Provides a button in the tool bar of the finder window to open terminal in that location. Once git is installed, might also install go2shell:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |