Difference between revisions of "Course restore"

Jump to: navigation, search

Note: You are currently viewing documentation for Moodle 2.9. Up-to-date documentation for the latest stable version of Moodle may be available here: Course restore.

(adding template)
(new features template)
 
(16 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Re-using courses and activities}}
+
{{Backup}}
{{Improve}}
+
==Restoring a course backup==
  
Courses can be restored from a backup made by Moodle.  Course backups are usually stored in the '''backupdata''' folder within the [[Files|course files]] folder. There is a restore link next to every course backup.
+
A course backup file (.mbz) may be restored from within any existing course for which you have permission. During the restore process, you will be given the option to restore as a new course or into an existing course.
  
The backup and restore process is a common way of moving or, copying specific courses from one Moodle to another.
+
Note (1) If you are restoring a course with user data (forum posts for example) then be careful when setting the course start date as all data will display within the same timeframe but from the new start date. So if your course originally began in 2010 and participants posted in 2012, then if you restore your new course with a start date of 2014, these forum posts will display with a date of 2016, ie, 2 years after the original course start date. See MDL-9367 and MDL-44961.
  
 +
Note (2) If your new course has fewer sections than the course you are restoring, the extra sections will appear as "orphaned activities". Increase the number of sections in the new course to make them visible.
  
==Restoring a course==
+
{{New features}}Note (3) If you are restoring a course from a different Moodle site and you obtain the error message "Trying to restore user (admin) from backup file will cause conflict", you can enable the setting 'Allow admin conflict resolution' in ''Site admin > Courses > Backups > General import defaults'' (Moodle 2.9.5 onwards only).
[[Image:Course_restore_s1.jpg|thumb|The backupdata folder]][[Image:Course_restore_s1b.jpg|thumb|Restoring a course - page 1]][[Image:Course_restore_s2.jpg|thumb|Restoring a course - page 2]][[Image:Course_restore_s3.jpg|thumb|Restoring a course - page 3]]
 
To restore a course from a backup file:
 
  
#Either upload a backup zip file to your course files area or click Restore in the [[Course administration block]] to access the backupdata folder.
+
# Go to ''Administration > Front page settings > Restore'' (if you have front page permissions) or ''Administration > Course administration > Restore'' (if you have an empty course to restore into.)
#Click the Restore link opposite the file you want to restore.
+
# Upload the backup file or choose a file in the course backup area or user private backup area and click Restore
#On the next page, click Yes to the question "Do you want to continue?" to start the restore process.
+
# Confirm - Check that everything is as required then click the Continue button
#Click the Continue button at the bottom of the next page, listing details of the backup.
+
# Destination - Choose whether the course should be restored as a new course or into an existing course then click the Continue button
#On the next page, select whether you want to restore to the existing course, adding data to it or deleting it first. If you have permission to restore to a new course, the restore page will contain additional options for setting the new course category, short name, full name, and start date.
+
# Settings - Select activities, blocks, filters and possibly other items as required then click the Next button
#Choose which activities you want to restore and whether to include user data (option only available for users with the capability [[Capabilities/moodle/restore:userinfo|moodle/restore:userinfo]]).
+
# Schema - Select/deselect specific items and amend the course name, short name and start date if necessary then click the Next button
#Select course users if you are including user data (option only available for users with the capability [[Capabilities/moodle/restore:userinfo|moodle/restore:userinfo]]).
+
# Review - Check that everything is as required, using the Previous button if necessary, then click the 'Perform restore' button  
#Select appropriate role mappings. The options depend upon the roles you are allowed to assign. By default, teachers are only allowed to assign the roles of non-editing teacher, student, and guest.
+
# Complete - Click the continue button
#Click the Continue button.
+
[[Image:newcoursebackup.png]]
#On the next page, click the "Restore this course now!" button.
 
#On the next page, the progress of the restore is displayed with a report if it was successful. Click the Continue button.
 
  
Restoring a course from a back-up file saved on a local computer:
+
==Restoring from course and category management screens==
In case you are restoring a course to a new site, please remember to check the course category after restoration. Courses get restored in the default category and you might have to manually move it to the correct category.
+
 
 +
Users with permission to access ''Site administration>Courses>Manage courses and categories'' or ''Site administration>Courses>Manage courses and categories>(Category name)'' can restore courses from here:
 +
 
 +
{|
 +
| [[File:courserestore27.png|thumb|300px|Restoring from course/management.php]]
 +
| [[File:courserestorecategory.png|thumb|300px|Restoring from the category management screen]]
 +
|}
 +
 
 +
==Course restore capabilities==
 +
 
 +
* [[Capabilities/moodle/restore:createuser|Create users on restore]]
 +
* [[Capabilities/moodle/restore:configure|Configure restore options]]
 +
* [[Capabilities/moodle/restore:restoreactivity|Restore activities]]
 +
* [[Capabilities/moodle/restore:restorecourse|Restore courses]]
 +
* [[Capabilities/moodle/restore:restoresection|Restore sections]]
 +
* [[Capabilities/moodle/restore:restoretargethub|Restore from files targeted as hub]]
 +
* [[Capabilities/moodle/restore:restoretargetimport|Restore from files targeted as import]]
 +
* [[Capabilities/moodle/restore:rolldates|Roll activity configuration dates on restore]]
 +
* [[Capabilities/moodle/restore:uploadfile|Upload files to backup areas]]
 +
* [[Capabilities/moodle/restore:userinfo|Restore user data]]
 +
* [[Capabilities/moodle/restore:viewautomatedfilearea|Restore courses from automated backups]]
  
 
==See also==
 
==See also==
  
*[[Course backup]]
+
* [[Restoring file aliases]]
[[Category:Backup]]
 
  
 
[[fr:Restauration]]
 
[[fr:Restauration]]
 
[[ja:リストア]]
 
[[ja:リストア]]
 
[[es:Restaurar_un_curso]]
 
[[es:Restaurar_un_curso]]
[[ca:Restaurar_un_curs]]
 
 
[[de:Kurswiederherstellung]]
 
[[de:Kurswiederherstellung]]

Latest revision as of 08:06, 14 March 2016

Restoring a course backup

A course backup file (.mbz) may be restored from within any existing course for which you have permission. During the restore process, you will be given the option to restore as a new course or into an existing course.

Note (1) If you are restoring a course with user data (forum posts for example) then be careful when setting the course start date as all data will display within the same timeframe but from the new start date. So if your course originally began in 2010 and participants posted in 2012, then if you restore your new course with a start date of 2014, these forum posts will display with a date of 2016, ie, 2 years after the original course start date. See MDL-9367 and MDL-44961.

Note (2) If your new course has fewer sections than the course you are restoring, the extra sections will appear as "orphaned activities". Increase the number of sections in the new course to make them visible.

New feature
in Moodle 2.9!
Note (3) If you are restoring a course from a different Moodle site and you obtain the error message "Trying to restore user (admin) from backup file will cause conflict", you can enable the setting 'Allow admin conflict resolution' in Site admin > Courses > Backups > General import defaults (Moodle 2.9.5 onwards only).

  1. Go to Administration > Front page settings > Restore (if you have front page permissions) or Administration > Course administration > Restore (if you have an empty course to restore into.)
  2. Upload the backup file or choose a file in the course backup area or user private backup area and click Restore
  3. Confirm - Check that everything is as required then click the Continue button
  4. Destination - Choose whether the course should be restored as a new course or into an existing course then click the Continue button
  5. Settings - Select activities, blocks, filters and possibly other items as required then click the Next button
  6. Schema - Select/deselect specific items and amend the course name, short name and start date if necessary then click the Next button
  7. Review - Check that everything is as required, using the Previous button if necessary, then click the 'Perform restore' button
  8. Complete - Click the continue button

newcoursebackup.png

Restoring from course and category management screens

Users with permission to access Site administration>Courses>Manage courses and categories or Site administration>Courses>Manage courses and categories>(Category name) can restore courses from here:

Restoring from course/management.php
Restoring from the category management screen

Course restore capabilities

See also