What is the MBZ file format?
An .mbz file is a course backup archive created by Moodle, the open-source learning management system developed by Moodle Pty Ltd. The extension stands for Moodle Backup Zip, though the modern format is no longer a ZIP file.
Modern .mbz files (Moodle 2.9 and later) are gzipped TAR archives - identifiable by the 1F 8B magic bytes at the start of the file. Older backups created before Moodle 2.9 were plain ZIP archives renamed to .mbz and begin with the PK signature (50 4B). You can tell which type you have by renaming the file to .tgz or .zip and opening it with any archive tool.
Internally, an .mbz archive contains:
moodle_backup.xml- the main manifest recording course metadata, Moodle version, and backup format version- Per-activity XML files for forums, quizzes, assignments, and other modules
- Gradebook and user-data XML files
- A
files/directory tree holding all embedded media and course documents
The file is designed to be restored through Moodle (Course Administration > Restore), not opened as a standalone document. The moodle_backup.xml manifest ties everything together, and a Moodle instance of the same or newer version than the one that created the backup is required for a successful restore.
File sizes typically range from 1 MB for a minimal text-based course to several GB for media-heavy ones. To inspect the contents without restoring, rename .mbz to .tgz and extract with tar -xzf course.tgz, or open with 7-Zip on Windows.
Security & safety
RISK: MEDIUMAn MBZ is inert archive data, safe to extract. The real concern is privacy: a course backup made 'with user data' contains students' personal information, submissions and grades - treat such MBZ files as confidential and handle per your institution's data-protection rules (e.g. GDPR/FERPA). Restoring an MBZ from an untrusted source can also import unexpected content/settings into your site, so only restore backups you trust, ideally into a test course first.
Format details
in a nutshellPrograms that open MBZ files
Technical details
deep spec| Container format | Gzipped TAR (`.tgz`) for Moodle 2.9 and later; plain ZIP archive for older backups |
| Magic bytes | `1F 8B` (gzip) for modern `.tgz`-based backups; `50 4B` (PK) for legacy ZIP-based backups - check the header to distinguish |
| MIME type | `application/gzip` for modern backups; `application/zip` for legacy ZIP-based backups |
| Compression | gzip (DEFLATE) applied over a TAR stream for current files; ZIP DEFLATE used in legacy backups |
| Manifest file | `moodle_backup.xml` at the archive root - records Moodle version, backup format version, course structure and activity list |
| Internal structure | Archive root holds `moodle_backup.xml`, per-activity XML subdirectories (one per forum, quiz, assignment, etc.), gradebook and user XML, and a `files/` media tree |
| Naming origin | "MBZ" stands for Moodle Backup Zip - the name was kept even after the container switched from ZIP to gzipped TAR in Moodle 2.9 |
| Encryption | None - the archive carries no built-in encryption; external file-level protection must be applied separately |
| Integrity check | gzip CRC32 on the compressed stream; no whole-archive checksum is embedded in the `.mbz` file |
| Typical file size | 1 MB to several GB, depending on course content volume, embedded media, and user data included in the backup |
| Restore version requirement | A Moodle instance of the same version or newer than the originating site is required; downgrade restores are not supported |
| Inspection without Moodle | Rename `.mbz` to `.tgz` and run `tar -xzf course.tgz`, or rename to `.zip` (legacy) and extract with any standard archiver |
| Activity granularity | Each Moodle activity stores its data in a dedicated XML subdirectory, allowing selective inspection of individual forums, quizzes, or assignments |
| Associated platform | Generated and consumed server-side on Linux or Windows Moodle installations; the archive itself is inspectable on any operating system |
| Released | Moodle 2.0 (2010) introduced the modern backup format; tar.gz became the default backup container in Moodle 2.9 (2015) |
| Latest version | Current Moodle (4.x / 5.x) - .tgz (gzipped TAR) backups with MoodleBackup XML manifest |
| Specification | docs.moodle.org |
MBZ conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about MBZ files.