Hi,
I'm interesting by this feature and just test backup and restore with the following versions :
backup : https://github.com/lazarosfs/moodle/blob/MDL-67553-master/admin/cli/backup.php
restore : https://github.com/lazarosfs/moodle/blob/MDL-67488-MOODLE_38_STABLE/admin/cli/restore.php
I'm on the latest moodle 3.8.1, on a test server
Backup seems to work fine. I get a warning :
---
loading controller from db
PHP Warning: max(): Array must contain at least one element in /var/www/moodle-3.8/course/format/lib.php on line 287
Warning: max(): Array must contain at least one element in /var/www/moodle-3.8/course/format/lib.php on line 287
setting controller status to 1000
-----
But nothing anormal, it's an empty course (no sections)
I have problem with the restore process
The category contains 12 courses. I backup the category and try to restore the courses in another category
Here's the commands I use :
sudo -u apache /opt/rh/rh-php72/root/bin/php backup.php --categoryid=449 --r --destination=/var/lib/moodle/backup_prod/
sudo -u apache /opt/rh/rh-php72/root/bin/php restore.php --categoryid=488 --create --source=/var/lib/moodle/backup_prod/
You can see the error in the attach file, it seems to be relative to questions of a quizz
Then, I try to restore the same course alone
sudo -u apache /opt/rh/rh-php72/root/bin/php restore.php --categoryid=488 --courseshortname=newmbox1 --source=/var/lib/moodle/backup_prod/sauvegarde-moodle2-course-1647-cours1-20200109-1523.mbz
And it works !!
In the meantime, Great job, thanks a lot
Bruno