Moodle 4.4.2 → 4.5.4 migration log (April 2025)
Historical notes from the April 2025 upgrade of the production ISC Learn (learn.isc-vs.ch on
hannibal), kept verbatim for plugin reference — the block of cp -a lines is the de-facto
inventory of the third-party plugins the site runs. The tested restore procedure is
on its own page.
### New Migration from 4.4.2 to 4.5.4
# 9H00 : Maintenance mode
cd /srv/www/learn.isc-vs.ch/moodle_isc/
sudo -u www-data /usr/bin/php admin/cli/maintenance.php --enable
# Retrieve package : DONE
#cd /srv/migration_moodle
#wget https://download.moodle.org/download.php/direct/stable405/moodle-4.5.4.tgz
#tar -xzf moodle-4.5.4.tgz
#mv /srv/migration_moodle/moodle /srv/migration_moodle/moodle_isc
cd /srv/migration_moodle
# Backup moodle Data
cp -a /srv/www/learn.isc-vs.ch/moodle_data /srv/www/learn.isc-vs.ch/moodle_data_4.4.2
# Backup moodle config
cp -a /srv/www/learn.isc-vs.ch/moodle_isc /srv/migration_moodle/moodle_isc_4.4.2
# 9H10 : Backup DB
mysqldump -u root -p -C -Q -e --create-options moodle_isc > /srv/migration_moodle/moodle_backup_$(date +%Y-%m-%d).sql
#### Start moving files : Put aside the old moodle_isc and replace with the 4.5.4 moodle_isc directory
mv /srv/www/learn.isc-vs.ch/moodle_isc /srv/www/learn.isc-vs.ch/moodle_isc_4.4.2
cp -a /srv/migration_moodle/moodle_isc /srv/www/learn.isc-vs.ch/
# To ease reading for the copies
export migration="/srv/www/learn.isc-vs.ch/moodle_isc_4.4.2"
export target="/srv/www/learn.isc-vs.ch/moodle_isc"
cp -a $migration/config.php $target/
cp -a $migration/theme/mb2nl $target/theme/
cp -a $migration/mod/vpl $target/mod/
chown -R moodle:www-data $target
### The upgrade part :
cd $target
sudo -u www-data /usr/bin/php8.3 admin/cli/upgrade.php
# All plugins copies
cp -a $migration/local/mb2builder $target/local/
cp -a $migration/local/mb2slides $target/local/
cp -a $migration/local/mb2coursenotes $target/local/
cp -a $migration/local/mb2megamenu $target/local/
cp -a $migration/local/mb2notices $target/local/
cp -a $migration/local/mb2reviews $target/local/
cp -a $migration/local/staticpage $target/local/
cp -a $migration/lib/editor/atto/plugins/mb2shortcodes $target/lib/editor/atto/plugins/
cp -a $migration/lib/editor/atto/plugins/c4l $target/lib/editor/atto/plugins/
cp -a $migration/lib/editor/atto/plugins/code $target/lib/editor/atto/plugins/
cp -a $migration/lib/editor/atto/plugins/templates4u $target/lib/editor/atto/plugins/
cp -a $migration/filter/mb2shortcodes $target/filter/
cp -a $migration/filter/synhi $target/filter/
cp -a $migration/filter/syntaxhighlighter $target/filter/
cp -a $migration/filter/filtercodes $target/filter/
cp -a $migration/report/coursesize $target/report/
cp -a $migration/blocks/mb2azcourses $target/blocks/
cp -a $migration/question/behaviour/adaptive_adapted_for_coderunner $target/question/behaviour/
cp -a $migration/question/type/coderunner $target/question/type/
cp -a $migration/admin/tool/redis $target/admin/tool/
cp -a $migration/local/mailtest $target/local/
systemctl restart php8.3-fpm.service && systemctl restart apache2
cd /srv/www/learn.isc-vs.ch/moodle_isc/
sudo -u www-data /usr/bin/php admin/cli/maintenance.php --disable
# Erreur "cache definition does not exist local_mb2builder/pagedata" → vider le cache :
cd /srv/www/learn.isc-vs.ch/moodle_data/
rm -rf ./cache/ ./temp/ ./trashdir/ ./sessions/ ./localcache/ ./muc/
# Finir l'upgrade dans le GUI sans le plugin "stockphotos", puis le désinstaller
mkdir /srv/migration_moodle/quarantine_faulty_plugin
mv /srv/www/learn.isc-vs.ch/moodle_isc_4.4.2/repository/stockphotos /srv/migration_moodle/quarantine_faulty_plugin/
# Test Switch-Edu ID : connexion OK
############# Upgrade terminée #######