by Ken Task.
If you are talking about an existing plugin that does as described, haven't seen one ... but ...
a shell script using moosh commands
moosh course-delete 2 (where 2 is the course id number)
Then another moosh command:
course-restore
Restore course from path/to/backup.mbz to category or existig course.
Example 1: Restore backup.mbz into category with id=1
moosh course-restore backup.mbz 1
Example 2: Restore backup.mbz into existing course with id=3
moosh course-restore -e backup.mbz 3
Example 3: Ignore pre-check warnings, like restoring backup from higher Moodle version.
moosh course-restore --ignore-warnings backup.mbz 1
Example 4: Restore backup.mbz into existing course with id=3, overwrite course content.
moosh course-restore --overwrite backup.mbz 3
Category called "Tinker" (or whatever) - has no other courses in it.
There is a potential catch 22 ... recycle bin. Depending upon site factors, a little stress there if course is large or is made huge by tinkering and your server is in a space crunch.
Then another moosh command:
course-restore
Restore course from path/to/backup.mbz to category or existig course.
Example 1: Restore backup.mbz into category with id=1
moosh course-restore backup.mbz 1
Example 2: Restore backup.mbz into existing course with id=3
moosh course-restore -e backup.mbz 3
Example 3: Ignore pre-check warnings, like restoring backup from higher Moodle version.
moosh course-restore --ignore-warnings backup.mbz 1
Example 4: Restore backup.mbz into existing course with id=3, overwrite course content.
moosh course-restore --overwrite backup.mbz 3
Category called "Tinker" (or whatever) - has no other courses in it.
There is a potential catch 22 ... recycle bin. Depending upon site factors, a little stress there if course is large or is made huge by tinkering and your server is in a space crunch.
'SoS', Ken