From previous post:
all one needs to do is to change into the moodle instance directory and type: 'git pull'.
From previous post:
one could build into that 'git pull' script tar balling the code directory, the data directory, and doing a mysqldump of the DB
Call the script 'update' ... it backs up the moodle instance first ... then runs git pull. A script is nothing more than a series of commands in a text file - like a batch file of old - something like the following:
tar -cvf /home/backup/mdlback.tar /var/www/moodledata /var/www/html/moodle;
mysqldump -u [dbuser] -p[password] [moodledatabase] > /home/backup/mdlback.sql;
cd /var/www/html/moodle;
git pull;
chown apache:apache * -R;
"firewall" comment
Should have said 'filter' - my bad. While git does use it's own protocol and uses a certain port, School districts in Texas must provide filtering. Some filtering servers see .tar.gz's or traffic like git as something to be blocked. Git URL's might be blocked by filters.
Has nothing to with git per say as a filter will also deny wgets as well if not configured to allow the server to git/wget/update ClamAV, etc.. Too many of those filters don't take into account Linux servers ... even if they are Linux OS themselves. There is mention of firewalls in the docs for git on Moodle.org
http://docs.moodle.org/22/en/Git_for_Administrators
git commands issued by user and permissions … while documentation on Moodle.org recommends that or says it can be done, I sometimes have issues with that. Root user should never be denied and setting permissions/ownership doesn't take but a minute. Checking permissions/ownerships might be a good thing to do from time to time anyway.
If addons have a git repo (most of them do now), yes, one could fiddle with git to check those for updates as well. See above url as well.
'spirit of sharing', Ken