by Iván Yivoff.
After a lot of work, I was able to create a backup file from the command line from a HUGE course I need to move from one installation of moodle to a new one.The backup file is very, very large (2.2GB), so doing it via the web-form is not feasible. Luckily, moosh came to the rescue. Or so I thought.
Everytime I try to restore this course, either on an existing course or creating a new course, I receive the same error:
Top Moodle dir: /var/www/sitename.com/moodle
Current working dir: /var/www/sitename.com/moodle
Relative Moodle dir:
Processing command option 'help''
Processing command option 'directory''
Processing command option 'existing''
Processing command option 'overwrite''
Command: restore (course)
Options:
help (): ''
directory (): ''
existing (): ''
overwrite (): ''
Arguments:
../backup-moodle2-course-77-[100_%_xxx_xxx_xxx]_1-_fundamental_(feb._28_-_may_9_)-20170628-1354-nu.mbz 6
Extracting Moode backup file to: '/var/www/moodledata/temp/backup/moosh_restore_5953d23ceb530'
Creating new course to restore backup
instantiating restore controller 8d7fd7eac847a8a62d5adae0672d2db9
setting controller status to 100
loading backup info
loading controller plan
setting controller status to 300
applying restore defaults
Unknown setting: questionbank
setting controller status to 400
checking plan security
setting controller status to 600
saving controller to db
calculating controller checksum 6e081c618644174d06d48a520580a14f
loading controller from db
Restoring (new course id,shortname,destination category): 135,[100 % XXX XXX XXX] 1- FUNDAMENTAL (Feb. 28 - May 9 )_2,6
Default exception handler: error/setting_by_name_not_found Debug:
Error code: setting_by_name_not_found
$a contents: enrol_migratetomanual
* line 124 of /backup/util/plan/base_plan.class.php: base_plan_exception thrown
* line 97 of /backup/util/plan/base_task.class.php: call to base_plan->get_setting()
* line 159 of /home/ubuntu/moosh/Moosh/Command/Moodle29/Course/CourseRestore.php: call to base_task->get_setting()
* line 285 of /home/ubuntu/moosh/moosh.php: call to Moosh\Command\Moodle29\Course\CourseRestore->execute()
++ This page should be using theme leapglobal which cannot be initialised. Nor can the site theme leapglobal. Falling back to boost ++
* line 516 of /lib/outputlib.php: call to debugging()
* line 1596 of /lib/pagelib.php: call to theme_config::load()
* line 1848 of /lib/setuplib.php: call to moodle_page->initialise_theme_and_output()
* line 388 of /lib/setuplib.php: call to bootstrap_renderer->__call()
* line ? of unknownfile: call to default_exception_handler()
!!! error/setting_by_name_not_found !!!
!!
Error code: setting_by_name_not_found
$a contents: enrol_migratetomanual !!
!! Stack trace: * line 124 of /backup/util/plan/base_plan.class.php: base_plan_exception thrown
* line 97 of /backup/util/plan/base_task.class.php: call to base_plan->get_setting()
* line 159 of /home/ubuntu/moosh/Moosh/Command/Moodle29/Course/CourseRestore.php: call to base_task->get_setting()
* line 285 of /home/ubuntu/moosh/moosh.php: call to Moosh\Command\Moodle29\Course\CourseRestore->execute()
!!
The error seems to be complaining about not finding "questionbank" settings, but I don't understand WHERE it is not finding that setting.
I have also found this thread, and tried applying the suggested fix, to no avail.
Hitting a wall with this, and we really need to be able to export/import this course (variations of this course are created seasonally, and they always start using a copy from the previous course as a template).
Thanks in advance for anything that pushes us in the right direction,
Kind regards