Guides · Migrations
Moodle course backup without user data

A course backup without user data is the clean copy of a course: its structure, activities, resources and settings, with no students in it. It is the file you want for a rollover, for sharing a course with a colleague, and for any tool that checks course content. This guide covers the setting that matters, what the file leaves out, when to anonymise instead, how to change the site default, and how to restore the file as next year's course.
The steps and menu names below are from the Moodle 5.3 documentation. Where a behaviour depends on the version, the version is given.
Make the backup
- Open the course and go to Course navigation > More > Course reuse, then choose Backup.
- On Initial settings, untick Include enrolled users. Leave the other user options off as well: anonymise, role assignments, user files, comments, user completion details, course logs and grade history.
- Keep activities, blocks and filters ticked, then choose Next.
- On Schema settings, untick any activity or section you do not want to carry forward. Show type options lets you pick by activity type.
- Check the summary on Confirmation and review and choose Perform backup, then Continue.
If the defaults already exclude users, Jump to final step skips the middle screens and uses them.
The file is saved in the course backup area. To download it, open Course reuse > Restore in the same course, where the course backup area is listed. Downloading needs the capability "Download files from backup areas" (backup:downloadfile).
Check the file name
Moodle marks the choice in the file name, which makes it a quick check before you share a file:
| File name ends | What it means |
|---|---|
| -nu.mbz | No enrolled users in the backup |
| -an.mbz | Users included, with names and emails replaced |
| -nf in the name | No files included |
The extension stands for "Moodle backup zip". Moodle 5.2 added configurable default backup file names, so on a newer site check the pattern your administrator has set.
What a no-user backup leaves out
With enrolled users excluded, the backup holds the course, not the people. The user options on the same screen, user files, comments, user completion details, course logs and grade history, are the parts that describe what people did in the course. Two further points from the Moodle FAQ:
- Passwords are never in a course backup, even when enrolled users are included.
- Some content travels only when it is used. Quiz questions come across only if a question from their category is in a quiz, and scales only if an activity uses them. Check the question bank in the restored course.
Anonymise or exclude?
Anonymising keeps the user records and replaces each person's name and email with an alias, with emails at @doesntexist.com. It is for when you need the shape of the activity, for example to test a gradebook, but not the identities.
| You need | Use |
|---|---|
| Next year's course, a shared copy, a content check | Exclude enrolled users (-nu) |
| Realistic activity for testing, no real names | Anonymise (-an) |
| A full record of the course and its users | A full backup, kept under your retention rules |
Including users needs the capability "Backup user data" (backup:userinfo); anonymising needs "Anonymise user data on backup" (backup:anonymise). If a role should never take user data out, leave those off for it.
Set it as the site default
A site administrator sets the starting values for every course backup at Site administration > Courses > Backups > General backup defaults. Each setting can be locked, so it cannot be changed when a backup is made. Unticking and locking Include enrolled users there makes no-user backups the normal case for teaching staff. The FAQ notes that Include logs and Include histories are off by default on that page.
Restore it as next year's course
- Open Course reuse > Restore and choose the file from the course backup area, or upload the .mbz.
- Choose Continue, then restore as a new course in the right category.
- Keep the activities and sections you want on the settings step.
- On the Schema step, set the new course name, short name and start date. Activity and section dates move to fit the new start date.
- Choose Perform restore.
Restore onto the same Moodle version the backup came from, or a newer one. The person restoring gets a role in the new course, Teacher by default, through the setting "Restorers' role in courses".
To copy content into a course that already exists, Course reuse > Import does a similar job and never includes user data, though it does not bring the course image or summary.
For a very large course, the documentation points to the command-line backup and restore scripts. The restore script handles large files from Moodle 3.10. If a backup sits on "pending" and never arrives, see Moodle course backup stuck or pending. Before restoring onto a newly upgraded site, run the course check after a Moodle upgrade.
A worked example
At a demo university the learning technology team rolls 40 modules forward each summer. In June they lock Include enrolled users off in the general backup defaults. Each module leader backs up their course, and the team checks every file name ends -nu.mbz before restoring it as a new course with this year's start date. One file ends -an.mbz: the module leader had ticked anonymise. It is made again without users before it goes anywhere.
Check the restored course
A restored course still carries last year's typed dates, links to removed activities and empty sections.
The Moodle rollover checklist covers all six, and putting lecture recordings in a Moodle course covers the recording links.
Bradawl Content Check works with Moodle. It opens a course backup made without user data, refuses any backup that holds user data, runs in your browser and sends nothing anywhere. It has been tested on invented data, and no findings is not a sign-off that a course is ready. Your -nu.mbz file is exactly what it reads: download Content Check and open the backup you just made.
Moodle is a trademark of its owner. Bradawl is independent and not affiliated with it.
Related guides
- Moodle course backup stuck or pending
- After a Moodle upgrade: the course-level check
- Moodle course rollover checklist: what last year leaves behind
- Putting lecture recordings in a Moodle course
Panopto, Blackboard, Moodle, Canvas and Microsoft Teams are trademarks of their owners. Bradawl is independent and not affiliated with them.