Does anyone know of an automated way to do that?
moosh does not allow for options like "no userdata", while automated backups in moodle do not allow restricting to specific courses
Sorry i don't provide a direct solution for you.
But perhaps you can vote/comment for MDL-52050, that could finally help for your need.
You can also create a little bash script, calling in a loop (with all needed course IDs) the /admin/cli/backup.php script. But it will use your current settings for backups (so you need to modify them before and after).
Hi, I've been working with course's backup/restore in moodle.
You can try to make backups con cli or moosh:
Example \$sudo -u www-data /usr/bin/php admin/cli/backup.php --courseid=2 --destination=/moodle/backup/
In "General backup defaults" settings not check "Include user completion information"
Both take into account the configuration of moodle.
To restore courses in another site I'm using https://github.com/tmas0/moodle-tool_autorestore, this plugin has has its own configuration
moosh not works for me:
Default exception handler: error/setting_by_name_not_found Debug:
Error code: setting_by_name_not_found
$a contents: enrol_migratetomanual
other Plugins related:
I've tested that in moodle 3.3.