Moodle Plugins directory: Backup and Restore Command-Line Interface | Moodle.org
Backup and Restore Command-Line Interface
Administration tools ::: tool_brcli
Maintained by
Paulo Júnior
BrCLI (Backup & Restore Command-Line Interface) is a plug-in integrated in Moodle that allows administrators to backup and restore courses via a command line interface.
Latest release:
1196 sites
109 downloads
31 fans
Current versions available: 1
BrCLI
BrCLI (Backup & Restore Command-Line Interface) is a command-line plug-in integrated in Moodle that allows administrators to performs bulk backup and restores of all categories, not just a single course.
Features
- backup all courses of a specific category using a single command.
- restore a set of courses backup files in a specific category.
How to use
Please type the commands below to know how to use this plugin:
sudo -u www-data /usr/bin/php admin/tool/brcli/backup.php --help
sudo -u www-data /usr/bin/php admin/tool/brcli/restore.php --help
Release notes
- v1.2 - the description of the plugin was improved.
- v1.1 - it is mandatory to inform the destination folder.
- v1.0 - the restore feature is available.
- v0.2 - allows the admin to backup all courses of a specific category.
- v0.1 - initial version.
Useful links
Contributors
Paulo Júnior (Lead maintainer)
Alexandre José de Carvalho Silva: Product Owner
Please login to view contributors details and/or to contact them
This plugin (brcli) actually uses a Moodle API to backup each course. So, unfortunately I can't help you about the performance issue.
However, I know someone is working to make category backup and restore available in the Moodle core: https://moodle.org/mod/forum/discuss.php?d=394427
I encourgae you to visit the website above and check their proposal.
Best regards. Paulo.
I need your help since I've reached a point in which I can't restore a course if it has questions in banks and quizzes. this is the error that it's given me when I try to restore it "Unknown setting: questionbank" (see code below).
Restoring backup of the 4/4 course...
instantiating restore controller 74a5d2834a969a7efadac492b1523d03
setting controller status to 100
loading backup info
loading controller plan
setting controller status to 300
applying restore defaults
Unknown setting: questionbank
However, when I tried to manually restore the backup file, It gave me the below three messages:
* The questions category "Default for 5th year", originally at system/course category context in backup file, will be created at course context by restore
* The questions category "Synthese 2015-2016", originally at system/course category context in backup file, will be created at course context by restore
* The questions category "top", originally at system/course category context in backup file, will be created at course context by restore
Noting that I am trying to restore this course in another category.
Please advise
Thanks!
This is a very interresting plugin while we plan to have a new Moodle server an bulk import courses.
But you should give more precisions on datas that are stored in the course backups.
There seems some user datas are integrated and some are not.
Could you please explain more precisely wich datas are stored in the kackup mbz ?
If it is possible to customize the datas backup while tweaking some of the code, please let me know how to do.
With great thanks for this admin tool plugin.
Kisses
Zabelle
Thank you for this very nice plugin!
2 Questions:
Is there a possibility to exclude user information from the backup, like uncheck "include enrolled users"?
Is the use of sudo -u www-data mandatory?
Best regards!
Someone is working to make category backup and restore available in the Moodle core: https://moodle.org/mod/forum/discuss.php?d=394427
Hence, we have not added new features in the "brcli" plugin. I encourgae you to visit the website above and check their proposal.
Best regards. Paulo.
On our Production environment i have an interface.
Eu realizei o backup da categoria 2 há um mes atras e tudo ocorreu sem problemas. No entanto, agora eu preciso restaurar o backup e estou recebendo o seguinte erro:
error/cannot_precheck_wrong_status
Pode me ajudar, por favor?
Obrigado.
Will this work with Moodle v4.x? (if not, are there any plans for an update?)
Thank you!
Same as Miguel Ángel Sanz said: would be useful to have an extra optional parameter to perform a recursive subcategories search and backup, too.