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

Course restore: Difference between revisions

From MoodleDocs
No edit summary
(→‎Course restore capabilities: removing cap no longer used)
 
(70 intermediate revisions by 16 users not shown)
Line 1: Line 1:
'''Note for Contributors'''
{{Backup}}
This page should explain what can be seen on the <u>moodlesite.com/files/index/backupdata.php</u> page
==Restoring a course backup==
just before starting the restore process
The actual restore process should be explained [[backup/restore|here]]


Clicking on Restore, you will get transferred to the page with the list of the files you have backed up, the information of their sizes, the last time they were modified and the actions you can undertake with those files (you can unzip them, get a list of zipped files, restore or rename them).  
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.  


If you choose to restore any of the files, you will move to another page with the notice: "Later in this process you will have a choice of adding this backup to an existing course or creating a completely new course." Clicking Continue will transfer you to another page with the backup details, i.e. the list of activities you are going to restore. Clicking Continue will transfer you to another page, in which you will be given the choice of restoring the backup files to the current course with the addition of data to the course or with deleting first the current course.
{{MediaPlayer | url = https://youtu.be/0x5X4YcCcz4 | desc = Overview of course restore. (Instructions are for MoodleCloud but also apply to other sites.)}}
 
# With the [[Boost theme]] click the gear menu and then 'Restore' Otherwise, go to ''Site 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.)
# 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
# Destination - Choose whether the course should be restored as a new course or into an existing course then click the Continue button
# Settings - Select activities, blocks, filters and possibly other items as required then click the Next button
# Schema - Select/deselect specific items and amend the course name, short name and start date if necessary then click the Next button
# Review - Check that everything is as required, using the Previous button if necessary, then click the 'Perform restore' button
# Complete - Click the continue button
 
Notes:
 
# If you are restoring a course with user data (forum posts for example) then  the user data will keep the original dates, whereas the activities and sections will change according to the new course start time you set.
# 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.
# 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''
# When restoring a course containing calendar events from activities e.g. assignment due dates, these events will appear in the calendar a short while after restoring the course. The events are added to the calendar via a cron task. Restoring multiple courses will result in queued tasks with a possible delay before events appear in the calendar.
 
==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:
 
{|
| [[File:RestoreBoost.png|thumb|300px|Boost theme]]
| [[File:courserestorecategory.png|thumb|300px|Non-Boost themes]]
|}
 
==General restore defaults==
 
An administrator can set defaults and lock selected restore settings in 'General restore defaults' in the Site administration. If a setting is locked, then it can not be changed when restoring a course.
 
Different defaults may be set for restoring and merging into another course and for restoring and deleting the course contents.
 
==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: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==
 
* [[Restoring file aliases]]
* Administrators can use [http://moosh-online.com/commands/#course-restore MOOSH] to bulk backup and restore courses from CLI
 
[[Category:Course]]
 
[[fr:Restauration de cours]]
[[ja:リストア]]
[[es:Restaurar_un_curso]]
[[de:Kurswiederherstellung]]

Latest revision as of 04:47, 4 September 2019

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.

Overview of course restore. (Instructions are for MoodleCloud but also apply to other sites.)
  1. With the Boost theme click the gear menu and then 'Restore' Otherwise, go to Site 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

Notes:

  1. If you are restoring a course with user data (forum posts for example) then the user data will keep the original dates, whereas the activities and sections will change according to the new course start time you set.
  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.
  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
  4. When restoring a course containing calendar events from activities e.g. assignment due dates, these events will appear in the calendar a short while after restoring the course. The events are added to the calendar via a cron task. Restoring multiple courses will result in queued tasks with a possible delay before events appear in the calendar.

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:

Boost theme
Non-Boost themes

General restore defaults

An administrator can set defaults and lock selected restore settings in 'General restore defaults' in the Site administration. If a setting is locked, then it can not be changed when restoring a course.

Different defaults may be set for restoring and merging into another course and for restoring and deleting the course contents.

Course restore capabilities

See also