+1 to Jez response ...
this posting a little deeper ... and my 2 cents ... others will have other suggestions ...
Backups first ... right? Minimla would be code/DB and filedir of moodledata.
Issues ...
all begins with how one updates/upgrades core.
Strongly recommend git. Code directories stay in place.
No renaming, moving, etc.
Depending upon whether it's an update ... like 3.7.0 -> 3.7.highest
or an upgrade ... like from 3.6.x -> 3.7.highest ... git acquisition
of code is literally a matter of minutes.
The plugins are still a problem *IF* one wants to update/upgrade everything
at once. Hmmmm .... seems to me, one had better have a dev server for testing
doing all at once. A single plugin ... or in the most recent upgrades to 3.7 the
theme can cause major disruption until resolved. Even if one had an addplugins directory
for them all.
So you have the same 50 plugins for all of your X sites?
Updates to plugins might a major change of the plugin or it might be only a version
change.
Am gonna stick my neck out and say that plugin updates might be best done via Admin GUI
and in some cases one at a time - depending upon how massive the update/upgrade is and
what it is (theme has potential of total disruption).
Use command line?
Have found that updating plugins can be done quickly and in some cases (depending upon
the plugin) be done while site is being used - case in point ... plugin that is
an admin report or some admin tool teachers/participants can't and don't access.
There is some relief ... https://moosh-online.com/commands/
plugin-install
Download and install plugin. Requires plugin short name, and plugin version. You can obtain those data by using `plugin-list -v' command.
Example:
moosh plugin-install mod_quickmail 20160101
Have a sandbox server with 3.4,3.5,3.6, and 3.7 installed.
For each I build a plugins list txt file from the shortnames of the plugins.
Example of the plugins installed in the 3.4 called addons.txt:
mod_hvp
mod_questionnaire
mod_customcert
A bash shell script called checkaddons uses addons.txt and checks only those
via moosh.
#!/bin/bash
#
echo 'Add-on listing: ';
cat ./addons.txt;
echo '---------------------';
for i in `cat ./addons.txt`
do
echo "Addon in que: $i";
moosh -n plugin-list |grep $i
done
Renders:
Add-on listing:
mod_hvp
mod_questionnaire
mod_customcert
---------------------
Addon in que: mod_hvp
mod_hvp,2.7,2.8,2.9,3.0,3.1,3.2,3.3,3.4,3.5,3.6,3.7,https://moodle.org/plugins/download.php/20122/mod_hvp_moodle37_2019081600.zip
Addon in que: mod_questionnaire
mod_questionnaire,1.9,2.0,2.2,2.3,2.4,2.5,2.6,2.7,2.8,2.9,3.0,3.1,3.2,3.3,3.4,3.5,3.6,3.7,https://moodle.org/plugins/download.php/19726/mod_questionnaire_moodle37_2018110101.zip
Addon in que: mod_customcert
mod_customcert,2.9,3.0,3.1,3.4,3.5,3.6,3.7,https://moodle.org/plugins/download.php/19798/mod_customcert_moodle37_2019052001.zip
Note the plugins have version number in their filenames.
And with a little more scipting one could build a loopoing bash shell
that would install
mod_hvp_moodle37_2019081600.zip
moosh -n plugin-install mod_hvp 2019081600
Catch 22's ... directory exist moosh won't erase soooo a mv to a hidden safe.
[root@server moodle34]# mv mod/hvp mod/.hvp;moosh -n plugin-install mod_hvp 2019081600
Installing
name: mod_hvp
version: 2019081600
PHP Warning: rmdir(/var/www/moodle34data/cache/cachestore_file/default_application): Directory not empty in /var/www/html/moodle34/lib/moodlelib.php on line 9357
But, if cron job/task running as they should, that would be cleared very soon.
'SoS', Ken