Server Handbook live check: run log ------------------------------------------------------------------------------ Tool https://serverhandbook.com/tools/moodle-backup-mbz-inspector Check scripts/live/checks/tool-moodle-backup-mbz-inspector.mjs (sha256 5a775d898c75064b87616a769fa65ea031cfea99c749c5a10f1eac1b99f6eba2) Ran at 2026-12-05T09:20:24Z (275 s) Result PASS, all 24 claims held Tested on System Ubuntu 26.04.1 LTS Kernel 7.0.0-44-generic Package nginx 1.28.3-2ubuntu1.14 Package php-fpm 2:8.5+99ubuntu1 Package postgresql 18+290ubuntu1 Package moodle 5.3.1 Setup A fresh Ubuntu 26.04 server (4 GB of memory) with Moodle 5.3.1 installed as lesson 1 of the Moodle course installs it (Nginx, PHP-FPM, PostgreSQL; done by the check before the first step shown; the site name moodle.example.com points to it through an /etc/hosts line, as your DNS would), reached over SSH as a sudo user. The course was made by Moodle's own test generator (maketestcourse.php, size XS). Every version above was read from the server at run time. Passwords used on the throwaway test server are shown as [password]. How we test: https://serverhandbook.com/how-we-test ------------------------------------------------------------------------------ What the steps changed on the server (recorded before the first step and after the last) Packages added (0) Packages upgraded (0) Packages removed (0) Services enabled at boot (0) Services disabled (0) Listening sockets opened (0) Listening sockets closed (0) Files added in /etc (0) Files changed in /etc (0) Files removed from /etc (0) Disk used on / (includes logs written during the run): +8.6 MB ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Claims (24), each with what the run saw ------------------------------------------------------------------------------ 1. ok a bare Ubuntu 26.04 server box (web-server) starts 2. ok (setup) the site name points to this server 3. ok (setup) Nginx, PHP-FPM and the PHP extensions 4. ok (setup) PostgreSQL (Ubuntu's) 5. ok (setup) role and database moodle 6. ok (setup) Moodle 5.3.1 from git 7. ok (setup) the Composer libraries (vendor/) 8. ok (setup) moodledata 9. ok (setup) max_input_vars = 5000 (the installer needs it) 10. ok (setup) the command-line installer 11. ok (setup) config.php root:www-data 640, the router configured 12. ok (setup) Moodle's cron every minute (www-data) 13. ok (setup) the Nginx server block 14. ok (setup) the login page answers | Log in to the site | learn 15. ok maketestcourse.php made the course SH101 | [#######################################################] 100.0% | Course completed (0.4s) - done (0s) | | Generated course: http://moodle.example.com/course/view.php?id=2 | 2 16. ok the database lists its sections and its activities by type | 2 | assign|1 | forum|1 | page|1 | resource|2 17. ok backup.php wrote a .mbz file | == Performing backup... == | Writing /tmp/mbz/backup-moodle2-course-2-SH101-20261205-0924.mbz | Backup completed. | total 24 | -rw-rw-rw- 1 www-data www-data 22002 Dec 5 09:24 backup-moodle2-course-2-SH101-20261205-0924.mbz 18. ok tar: .ARCHIVE_INDEX, moodle_backup.xml, users.xml and files// (the layout the tool reads) | 109 entries, 64615 bytes | .ARCHIVE_INDEX | moodle_backup.xml | users.xml | 4 | 2 19. ok the tool refuses a cut-off file, a zip .mbz, a file that is not gzip and one with no moodle_backup.xml, each with its reason (local check: all pass) | PASS the hand-built backup is read | PASS entries equal tar -tzf (35) | PASS files and unpacked bytes equal python's tarfile (22 files, 14547 B) | PASS Moodle release, backup date, course names | PASS two sections, activities in their sections, in order | PASS the Urdu and Chinese titles survive | PASS an escaped & in a title is decoded | PASS counts by type: assign 2, then forum, quiz, resource 1 | PASS each activity has its folder size | PASS users included, 3 user records counted, user data per activity | PASS a user-data warning, with the count | PASS no personal data in the report (no username or email) | PASS stored files 2, 4500 B; files.xml areas summed, "." folders left out | PASS no other warning on a whole backup | PASS no users: users not included, no count, no user-data warning | PASS a missing gradebook.xml is warned | PASS a file listed in files.xml but not stored is warned | PASS a tar with no end marker is read with a warning | PASS refused: truncated (first half of the file) | PASS refused: cut inside the tar (whole gzip of a cut tar) | PASS refused: not gzip (a text file) | PASS refused: a zip .mbz (usezipbackups) | PASS refused: gzip of something that is not tar | PASS refused: damaged gzip data | PASS refused: a tar.gz with no moodle_backup.xml | PASS refused: a broken moodle_backup.xml | PASS refused: an empty file | PASS real backup /tmp/moodle-mbz-Z1uZ6d/course.mbz: read, entries and bytes equal tar | REPORT {"name":"backup-moodle2-course-2-SH101-20261205-0924.mbz","moodleVersion":"2026100501","moodleRelease":"5.3.1 (Build: 20261112)","backupRelease":"5.3","backupDate":"2026-12-05T09:24:28.000Z","type":"course","mode":"10","courseFormat":"topics","courseFullname":"Server basics","courseShortname":"SH101","usersIncluded":true,"users":2,"filesIncluded":true,"sections":2,"activities":5,"byType":[{"modulename":"resource","count":2},{"modulename":"assign","count":1},{"modulename":"forum","count":1},{"modulename":"page","count":1}],"entries":109,"fileEntries":94,"stored":{"count":4,"bytes":9280},"warnings":["This backup contains user data (2 user records): names, email addresses and, with activities' user data, their submissions and grades. Store and send it as personal data."]} | | all checks pass 20. ok the tool: the backup's name, Moodle 5.3.1, the course "Server basics" (SH101) | { | "name": "backup-moodle2-course-2-SH101-20261205-0924.mbz", | "release": "5.3.1 (Build: 20261112)", | "course": "Server basics", | "shortname": "SH101", | "sections": 2, | "activities": 5, | "byType": [ | { | "modulename": "resource", | "count": 2 | }, | { | "modulename": "assign", | "count": 1 | }, | { | "modulename": "forum", | "count": 1 | }, | { | "modulename": "page", | "count": 1 | } | ], | "usersIncluded": true, | "users": 2, | "filesIncluded": true, | "entries": 109, | "stored": { | "count": 4, | "bytes": 9280 | }, | "warnings": [ | "This backup contains user data (2 user records): names, email addresses and, with activities user data, their submissions and grades. Store and send it as personal data." | ] | } 21. ok the tool: the same sections and the same activities by type as Moodle’s database | { | "name": "backup-moodle2-course-2-SH101-20261205-0924.mbz", | "release": "5.3.1 (Build: 20261112)", | "course": "Server basics", | "shortname": "SH101", | "sections": 2, | "activities": 5, | "byType": [ | { | "modulename": "resource", | "count": 2 | }, | { | "modulename": "assign", | "count": 1 | }, | { | "modulename": "forum", | "count": 1 | }, | { | "modulename": "page", | "count": 1 | } | ], | "usersIncluded": true, | "users": 2, | "filesIncluded": true, | "entries": 109, | "stored": { | "count": 4, | "bytes": 9280 | }, | "warnings": [ | "This backup contains user data (2 user records): names, email addresses and, with activities user data, their submissions and grades. Store and send it as personal data." | ] | } | database: 2 sections {"assign":1,"forum":1,"page":1,"resource":2} 22. ok the tool: users and files included, the users.xml count and the stored files equal tar | { | "name": "backup-moodle2-course-2-SH101-20261205-0924.mbz", | "release": "5.3.1 (Build: 20261112)", | "course": "Server basics", | "shortname": "SH101", | "sections": 2, | "activities": 5, | "byType": [ | { | "modulename": "resource", | "count": 2 | }, | { | "modulename": "assign", | "count": 1 | }, | { | "modulename": "forum", | "count": 1 | }, | { | "modulename": "page", | "count": 1 | } | ], | "usersIncluded": true, | "users": 2, | "filesIncluded": true, | "entries": 109, | "stored": { | "count": 4, | "bytes": 9280 | }, | "warnings": [ | "This backup contains user data (2 user records): names, email addresses and, with activities user data, their submissions and grades. Store and send it as personal data." | ] | } | tar: 2 users, 4 stored files 23. ok the tool: every tar entry and every unpacked byte equal tar -tvzf | PASS real backup /tmp/moodle-mbz-Z1uZ6d/course.mbz: read, entries and bytes equal tar | tar: 109 entries, 64615 bytes 24. ok (tested on) the box reports its OS, kernel and the version of 4 package(s) | PRETTY_NAME="Ubuntu 26.04.1 LTS" | VIRT=none | KERNEL=7.0.0-44-generic | PKG nginx 1.28.3-2ubuntu1.14 | PKG php-fpm 2:8.5+99ubuntu1 | PKG postgresql 18+290ubuntu1 | moodle: $release = '5.3.1 (Build: 20261112)'; // Human-friendly version name ------------------------------------------------------------------------------ Commands and what they printed (5) ------------------------------------------------------------------------------ $ cd /var/www/moodle $ G=$(ls public/admin/tool/generator/cli/maketestcourse.php admin/tool/generator/cli/maketestcourse.php 2>/dev/null | head -n 1) $ sudo -u www-data php $G --shortname=SH101 --fullname="Server basics" --size=XS --bypasscheck 2>&1 | tail -n 4 [#######################################################] 100.0% Course completed (0.4s) - done (0s) Generated course: http://moodle.example.com/course/view.php?id=2 $ sudo -u postgres psql -d moodle -At -F '|' -c "SELECT count(*) FROM mdl_course_sections WHERE course = 2" $ sudo -u postgres psql -d moodle -At -F '|' -c "SELECT m.name, count(*) FROM mdl_course_modules cm JOIN mdl_modules m ON m.id = cm.module WHERE cm.course = 2 AND cm.deletioninprogress = 0 GROUP BY m.name ORDER BY m.name" 2 assign|1 forum|1 page|1 resource|2 $ sudo mkdir -p /tmp/mbz && sudo chown www-data /tmp/mbz $ cd /var/www/moodle && sudo -u www-data php admin/cli/backup.php --courseid=2 --destination=/tmp/mbz 2>&1 | tail -n 3 $ ls -l /tmp/mbz == Performing backup... == Writing /tmp/mbz/backup-moodle2-course-2-SH101-20261205-0924.mbz Backup completed. total 24 -rw-rw-rw- 1 www-data www-data 22002 Dec 5 09:24 backup-moodle2-course-2-SH101-20261205-0924.mbz $ cd /tmp/mbz && tar -tvzf backup-moodle2-course-2-SH101-20261205-0924.mbz | awk '{ n++; b += $3 } END { print n " entries, " b " bytes" }' $ tar -tzf backup-moodle2-course-2-SH101-20261205-0924.mbz | grep -E '^(\.ARCHIVE_INDEX|moodle_backup\.xml|users\.xml)$' $ tar -tzf backup-moodle2-course-2-SH101-20261205-0924.mbz | grep -cE '^files/[0-9a-f]{2}/[0-9a-f]{40}$' $ tar -xOzf backup-moodle2-course-2-SH101-20261205-0924.mbz users.xml | grep -c '