MD backup and restore via Moosh - mccode-dev/McWeb GitHub Wiki
It turns out that the most stable way of backing up / restoring is via the Moosh commandline.
Below, the most important commands are listed, but please also consult http://moosh-online.com/commands/
- Find what courses are on the machine via course-list:
moosh course-list "id","category","shortname","fullname","visible" "1","0","e-neutrons","e-neutrons","1" "2","Top/Courses","intro-ns","Introduction to neutron scattering","1" "4","Top/Courses","man","Manuals and guidelines for creating course content","1" "5","Top/Courses","HERCULES","HERCULES","1" "11","Top/Courses","munich","Munich","0" "13","Top/Courses","lib","Library","1" "15","Top/Courses","musr","Introduction to muon spin spectroscopy","1" "16","Top/Courses","test","Moodle Sandbox","1" "17","Top/Courses","intro-ns-selfstudy","Introduction to neutron scattering - self-study","1" "18","Top/Courses","quiz-taster","Quiz taster","1" "19","Top/Courses","e-neutrons-for-teachers","e-neutrons for teachers","1"
- Back up the relevant course to a local file
moosh course-backup -f /tmp/intro-ns.mbz 2
-
Create a new course either via Moosh or via Moodle itself
-
Restore to that new course ID
moosh course-restore -e /tmp/intro-ns.mbz 28
- Clear out (most) users on that course for a fresh start:
moosh course-reset -s "unenrol_users=5,6" 28