Bulk Restore a Course

Re: Bulk Restore a Course

by Ken Task -
Number of replies: 0
Picture of Particularly helpful Moodlers
You could install moosh - command line utility like drush or wp-cli only for Moodle. It has a command to restore a backup file (.mbz) you provide the path to on server to a category. Could put that moosh command in a looping bash shell script to run X times. You'll have X restored courses all with 'copy #' in their titles where # is equal to the X in the looped script.
https://moodle.org/plugins/pluginversions.php?id=522 - remember it's command line not a GUI
https://moosh-online.com/commands/

Restores the .mbz file named to category 1:

moosh -n course-restore /home/torestore/restorethisone.mbz 1

Up arrow on command line, hit enter.  Executes same command again.
Do that a couple of times to see if you are getting what you want.

Then put the above command in a bash shell loop that runs X number of times.


'SoS', Ken
Average of ratings: Useful (1)