how to backup moodle course cli

by Jordane Smitham MD 5 min read

Backing up a course

  • Confirmation and review - Check that everything is as required, using the Previous button if necessary, otherwise click...
  • Complete - Click the Continue button

So how can you make a backup of your Moodle course?
  1. Click the gear menu and then select “backup.”
  2. Use the checkboxes to decide what you would like to bring over with your copy of the course. ...
  3. Experienced Moodlers can click the “jump to the final step” button, or if you prefer click “next”.
Nov 10, 2017

Full Answer

How do I save a course in Moodle?

Course backup Backing up a course. Go into the course. Click the Backup link either in the gear menu or the Administration block... Anonymizing user information. Anonymize user information is a backup feature which "protects user identities" by …

How to backup a Moodle course in PHP?

Apr 23, 2020 · To backup moodledata .. path is in config.php From your home directory and in ssh: tar -cvf moodledata.tar /path/to/moodledata To backup moodle code ... probably in /home/customer/public_html/? Use your cpanel or other tool that can browse files to locate. From home directory and in ssh tar -cvf moodle28code.tar /path/to/moodlecode

What is brcli in Moodle?

Find a course you want to backup, note its ID (e.g. 2) and SHORTNAME (e.g. mdlcourse) Run sudo -u www-data /usr/bin/php admin/cli/backup.php --courseid=2 Click on Restore in the interface, check that in the course backup area new file has been listed. Run sudo -u www-data /usr/bin/php admin/cli/backup.php --courseid=2 --destination=/some/dir

How do I backup a course?

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.

How do I backup a Moodle course?

Backup Your Moodle CourseLog in to Moodle and click on the course you want to back up.Under Administration, click Backup.On the Course backup screen, leave all checkboxes checked to backup both your course materials and student work. ... On the confirmation screen, click Continue.More items...

How do I backup and restore a Moodle course?

Restoring a course backupGo to Settings > Front page settings > Restore or Settings > Course administration > Restore.Upload the backup file or choose a file in the course backup area or user private backup area and click Restore.Confirm - Check that everything is as required then click the Continue button.More items...•Jul 5, 2012

How do I download a backup course in Moodle?

Downloading a backup fileGo to your course site in Moodle.Find the Administration block: Click Restore.Go to the User private backup area.Find your backup file. (The most recently created file will be at the top of the list.) ... Click Download to copy the backup to your hard drive.

How do I backup my Moodle site?

First sign into your Moodle administration panel:Once you are logged in you should click on the Site home option on the left:Then, in Administration under the Front page setting drop-down menu, you have to choose the Backup option:There, you will see the 5-stage backup process.More items...

Where are Moodle backups stored?

backupdataTo find the backup file for a course, go to the front page of that course, click Administration->Files, and look for a folder named backupdata. The backup file for the course should be found in that folder. If you don't see a backupdata folder, or if the folder is empty, then backups are not being made.Nov 28, 2006

How do I backup my Moodle quiz?

0:002:28Backup Moodle Quizzes - YouTubeYouTubeStart of suggested clipEnd of suggested clipSo once you're in your course room go to the settings block and go down to where it says questionMoreSo once you're in your course room go to the settings block and go down to where it says question bank and hit the little arrow next to it and select the option called export.

How do I backup a user in Moodle?

1Go to Administration > Course administration > Backup.Initial settings – Select activities, blocks, filters and other items as required then click the Next button. ... Schema settings – Select/deselect specific items to include in backup, then click the Next button.More items...

How do I download a whole course from Moodle?

To download the available course content, the Learner just has to click on the new 'Download course content' button that will appear on their course homepages: this will download all content contained in the course's File, Folder, Page and Label resources, compressed in a zip folder.Nov 16, 2020

What is backup class?

A course can be saved with some or all of its parts by using the course backup. Typically, the site administrator will set a schedule of automated course backups for the whole site. A teacher can create a backup or download an existing backup for safe keeping, or for use on another Moodle site.Aug 19, 2021

Does Moodle have backups?

A site backup allows a site administrator to save everything associated with a moodle site. These backups can be restored to bring a site back to the point in time when the backup was made.Mar 17, 2022

Backup via CLI

We cannot login to our Moodle. So I'm trying to backup the courses from CLI.

Re: Backup via CLI

You should really give more information : what's your Moodle version ? And technical details (PHP, DB...) of your host. And an idea of number of courses/users...

Re: Backup via CLI

We have Moodle 2.8, and Bluehost updated to PHP 7 a while ago. So we are not able to login. We need to extract courses and resources. So I'm trying to migrate the website to a local Moodle instalation in my Mac. I installed the MAMP version for 2.8 because that one comes with PHP 5.x

Re: Backup via CLI

'Perfect Storm' situation! 2.8 won't run under PHP 7.0.x and higher ... first version of Moodle that would is 3.0.x.

Re: Backup via CLI

To import large database from a big dump file without problem, you could perhaps use Bigdump script.

Backing up a course

If you are satisfied with the default settings and don't wish to go through all the backup screens, you can simply click 'Jump to final step' to perform the backup.

Anonymizing user information

Anonymize user information is a backup feature which "protects user identities" by making each user anonymous. If this box is checked in the backup initial settings, Moodle will substitute aliases for real names, substituting @doesntexist.com email addresses and so forth. For example "Max Manager" might become "anonfirstname4 anonlastname4".

Backup and restore of assignments from Moodle 2.2 and older

The assignment activity module was completely rewritten in Moodle 2.3. Thus, assignments from Moodle 2.2 and older (e.g. from Moodle 1.9) need to be upgraded in order to continue being usable. See the section 'Restoring course backups from Moodle 2.2 and older' in Assignment upgrade tool for details of what to do.

Tips and tricks

Lose content after a restore in Moodle 2.0 ? Do you see topic headings that say "Orphaned activities"? Solution: Go to course settings and increase the number of topic sections and things will return to normal.

Creative uses

The backup and restore processes can offer the teacher and administrators many creative solutions.

General backup defaults

Default settings for course backups can be set by a site administrator in Administration > Site administration > Courses > Backups > General backup defaults .

Backup and Restore Command-Line Interface

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.

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.

image

Backing Up A Course

  • To backup a course 1. Go to Administration > Course administration > Backup 2. Initial settings - Select activities, blocks, filters and other items as required then click the Next button. Users with appropriate permissions, such as administrators and managers, can choose whether to include users, anonymize user information, or include user role as...
See more on docs.moodle.org

Anonymizing User Information

  • Anonymize user information is a backup feature which "protects user identities" by making each user anonymous. If this box is checked in the backup initial settings, Moodle will substitute aliases for real names, substituting @doesntexist.com email addresses and so forth. For example "Max Manager" might become "anonfirstname4 anonlastname4".
See more on docs.moodle.org

Kup and Restore of Assignments from Moodle 2.2 and Older

  • The assignment activity module was completely rewritten in Moodle 2.3. Thus, assignments from Moodle 2.2 and older (e.g. from Moodle 1.9) need to be upgraded in order to continue being usable. See the section 'Restoring course backups from Moodle 2.2 and older' in Assignment upgrade toolfor details of what to do.
See more on docs.moodle.org

Tips and Tricks

  • Lose content after a restore in Moodle 2.0 ? Do you see topic headings that say "Orphaned activities"? Solution: Go to course settings and increase the number of topic sections and things will retu...
See more on docs.moodle.org

Creative Uses

  • The backup and restore processes can offer the teacher and administrators many creative solutions. 1. Duplicating courses or specific activities in one course to another course (similar to Import) 2. Updating a production Moodle site course, with material from a localhost site course 3. Transferring a course to a new Moodle site. 4. In earlier versions of Moodle, a way of rolling a co…
See more on docs.moodle.org

General Backup Defaults

  • Default settings for course backups can be set by a site administrator in Administration > Site administration > Courses > Backups > General backup defaults. Selected settings may be locked, so that they cannot be changed when creating a course backup. By selecting a time in the "Keep logs for.." dropdown, it is possible to specify how long backup logs information is kept before be…
See more on docs.moodle.org

Course Backup Capabilities

See Also