Backup tools in Moodle

Corner stone of every LMS is a course. Moodle is no different than the rest in that area. It offers a mechanism to backup, restore, or import individual courses. Every course can be backed up manually or automatically.

Manual backup

Manual backup can be performed from the course administrative block by clicking on the Backup option:

Manual backup

This leads us to the screen where we can choose which parts of the course we want to be exported. We will not go into much detail here since we talked about this in Chapter 8 and the screen itself is rather self explanatory. What is important to mention that all manual backups are always stored in course directory—<moodledata>/<course id>/backup.

Note

As you already know we do not encourage use of manual backup procedure due to potential security issues. In case you need to perform manual backup make sure to move the exported course to a safe location as soon as possible. Safe location in this context means a directory not accessible to any of the course users.

Automatic backup

Automatic backup is a way Moodle creates a backup of all courses in a predefined time interval. It is a very useful option for keeping the course history changes. In order to use this option we need to configure it. Visit the Administration | Courses | Backups page. There is a multitude of options which you can use for tailoring the process to your specific needs. The first 11 options are related to the parts of course you may or may not want to back up. By default everything is disabled.

Content export options for automatic backup

Here is the quick list of recommended settings for the exporting options:

Option

Description

Recommended setting

Include modules

Backup course activities

Enabled

Include module user data

Backup data generated by users within activities

Enabled

Metacourse

Export all data from external courses too*

Disabled

Users

What users to export with course

Course

Logs

Export log entries related to the course

Disabled

User files

Export user files generated by users within activities

Enabled

Course files

Export files from course directory

Enabled

Site files

Export site files used within course

Enabled

Grade histories

Export grading history (enable only if you have grading history activated on the platform level)

Disabled

Messages

Backup user instant messages

Disabled

Blogs

Backup user blog entries (enable only if you actually use blogs)

Disabled

* Metacourse is a special kind of course that can embed two or more external courses. Enabling this option means that all inherited data from external courses would also be exported with Metacourse. Enable this option only if you actually use Metacourses.

Execution configuration options

The five options for configuring the backup process itself are as follows. We can specify when and where we want to create and store backups. Here is the list and explanation of the options available:

  • Keep: This option is important because it enables us to specify how many backups per course to keep. By default it is set to 1. The number you choose should depend on several factors. What kind of server do you have? How much available free space do you have? What is the average size of course export within your instance of Moodle? How many courses do you have?

    Answering all these questions will help you determine the correct value for this parameter. If you are not sure, then start with the default value.

  • Active: This one is simple and straightforward. You must enable it in order to actually use automatic backup. Have in mind that automatic backups are implemented as Moodle cron task. You must set up and enable execution of Moodle cron (for details see Chapter 9).
  • Schedule: Determining an appropriate moment for executing backups is an important step in configuration of automatic backups. It actually depends on the pattern usage your courses have and it also relates to their number. The reason Im mentioning the actual number of the courses is because the bigger and more complex the courses are the more server time and resources will be used during export.

Note

Rant corner

Moodle backup is not well implemented because it has problems with handling big and complex course structures. This is especially true when quizzes are present. There were reported cases of backup process eating up more than several hundred MB of RAM or effectively crashing. This is the reason that backup and restore is largely rewritten in the upcoming Moodle 2.0. It promises to solve all these issues and offer moderate memory usage and a larger degree of stability.

  • Since backup is a memory and CPU intensive task it is essential to choose appropriate time of day for executing backup. Usually this would be between midnight and 3:00 a.m. This of course depends on the execution time set for the general Moodle cron. Here you can choose the days in the week where you would like to execute backup. We recommend selecting all days in the week if you have a sufficiently long low-usage time frame every day.
Execution configuration options
  • Execute at: Here we select the actual hour at which the backup task will be executed. The default value is set to midnight. That is a good starting point. You can move to another hour that is more appropriate for your kind of setup.

When to use Moodle automated backup

There are several questions to which you need to give affirmative answer in order to know whether you can successfully use this tool.

  • Can you successfully execute manual backup of every course?
  • Do you have a sufficiently large platform low-usage time frame (at least one hour) for executing backup?
  • Do you have enough free disk space on your server?

If answer is yes to all these questions you can consider using the automatic backup. If not you will have to focus on site backup procedures.

Course backups do not replace the usual site backups and should never be used as a primary backup system. They can be considered more like complements to the standard backup process.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.31.22