Skip to main content

Server Performance Review

Objective: confirm the host and OpenLiteSpeed service are healthy before cloning the new semester site.

  1. Check CPU & load

top -o %CPU uptime

top -o %CPU uptime
  1. Memory & swap

free -h swapon --show

free -h swapon --show
  1. Disk usage

df -h

df -h
  1. Check OpenLiteSpeed status

systemctl status lsws

systemctl status lsws
  1. View OpenLiteSpeed error logs

tail -n 200 /var/logs/openlitespeed/error.log 

tail -n 200 /usr/local/lsws/logs/error.log
  1. Check PHP (lsphp) FPM


/usr/local/lsws/fcgi-bin/lsphp -v

Page: Backup Verification (Template Preparation)

Objective: confirm the Moodle template is up to date and usable for cloning into the new semester site.

Process:
Instead of just testing a backup restore, your verification is making sure the template directories and DB are refreshed from the latest production backup.

Steps:

  1. Get latest production backup

    • Files from /moodleweb/moodle/{platformname}_{current_sem}

    • Data from /moodledata/{platformname}_{current_sem} or /data/{platformname}_{current_sem}

    • Database from production_{platformname}_{current_sem} on 192.168.23.167

  2. Copy to EL-CRON template path (192.168.23.128)

    • App files:


rsync -avz /moodleweb/moodle/{platformname}_{current_sem}/ /elearning_data/template/{platformname}_template45/
  • Data files:


rsync -avz /moodledata/{platformname}_{current_sem}/ /elearning_data/template/production_{platformname}_template45/
  • (Adjust path if data is in /data instead of /moodledata)

  1. Refresh the template database

    • Drop old template DB (optional, if re-creating)


mysql -h192.168.23.167 -uroot -p -e "DROP DATABASE IF EXISTS production_{platformname}_template45;"
  • Create new template DB and restore:


mysql -h192.168.23.167 -uroot -p -e "CREATE DATABASE production_{platformname}_template45 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;" mysqldump -h192.168.23.167 -uroot -p production_{platformname}_{current_sem} | mysql -h192.168.23.167 -uroot -p production_{platformname}_template45
  1. Verify template integrity

    • Check /elearning_data/template/{platformname}_template45 has the expected Moodle web files

    • Check /elearning_data/template/production_{platformname}_template45 has filedir, sessions, cache etc.

    • Confirm DB exists:


mysql -h192.168.23.167 -uroot -p -e "SHOW DATABASES LIKE 'production_{platformname}_template45';"
  1. Mark template ready

    • Once verified, this template is the source for new semester cloning in /moodleweb/moodle/{platformname}_{semester} and /moodledata/{platformname}_{semester} or /data/{platformname}_{semester}.