Backup restore

From MoodleDocs

Moodle has a course backup and restore process. Each successive version of Moodle has offered more options in this process. Many Moodle site administrators turn on an automated backup function, which does a full course backup on a schedule. The on demand backup and restore functions can be found in the administrative block of a course.

An administrator or teacher with course creator privileges can use the backup restore functions to create, transfer or restore parts of an existing course or a whole course.

In this document we will use a Version 1.6 process. Template:Moodle 1.6

Backup

File:Backup icon link.JPGSelecting backup icon, will give the user with the correct privilages 3 screens.

  • Screen 1: Provides options to select which activities and resources should be backed up. This screen also includes an option to include student data for each of these activities and resources. The bottom of screen 1 asks how to handled meta courses, users, log files, user files and course files. The continue button starts the backup process.
  • Screen 2 suggests a name for the backup file, which can be edited, informs the user what is actually going to be backed up. For example, the number of users and course files and which modules.
  • Screen 3 reports if it was successful and has a continue button.

Restore

Restore icon link.JPGSelecting the restore icon, will give show a list of files which can be restored in the backup directory. Select the file by clicking on restore link.

  • Screen 1- confirms the file you selected to restore and asks if you want to continue or cancel
  • Screen 2 - shows shows what is available in the file you have selected to restore
  • Screen 3 - gives many options for restoring.
    • Restore to option: new course, copy over a course or add to a course.
    • Individual activity options: check off those parts of the course to be restored
      • inclues option to restore student data for each part
    • Restore course files option - these are image or resource files
  • Screen 4 - Restore this course now button
  • Screen 5 - Reports on what was successfully restored

Notes

  • Administrators and Course Creators options are:
    • Restore to an existing course either adding to the course (keeping existing data) or deleting all existing data; or
    • The creation of a new course using the data in the backup file being restored.
  • Editing Teachers options are:
    • Restore to an existing course either adding to the course (keeping existing data) or deleting all existing data.

Restoring Moodle 1.6 and Before courses on 1.7 system

The procedure of restoring a 1.6 or before course on a 1.7 system has a slight addtion, that is there is additional role mapping information required (on Screen 3). Since 1.7 has dynamic roles system, it is possible to map the old roles (i.e. editting teachers, non-editting teachers and students) onto any new roles. By default, Moodle 1.7 look for legacy roles to map intelligently, for example Moodle 1.7 will map 1.6 Students onto a 1.7 legacy student role. The roles you can map onto is determined by what you can assign in the current context (current course or site). For example, if you have the teacher role in a 1.7 course, you will not be able to map "students" onto "Admins" in the restored course. There is also an option to create new roles to map onto.

Restoring 1.7 Course on 1.7

This works pretty much the same except there is role mapping information (on Screen 3). For every role in the backup course, you can select a corresponding role to map onto. By defaut, Moodle 1.7 compares the role shortname string and pre selects the same for you, as a result if you are restoring in the same site, then you don't have to worry about what roles to map onto. The roles you can map onto is determined by what you can assign in the current context (current course or site). For example, if you have the teacher role in a 1.7 course, you will not be able to map "students" onto "Admins" in the restored course. There is also an option to create new roles to map onto.

See also