Note: You are currently viewing documentation for Moodle 1.9. Up-to-date documentation for the latest stable version is available here: Course restore.

Course restore: Difference between revisions

From MoodleDocs
No edit summary
(note re backup 2.0)
 
(33 intermediate revisions by 13 users not shown)
Line 1: Line 1:
'''Note for Contributors'''
{{Course admin}}<p class="note">'''Note:''' Course backup and restore has been completely rewritten for Moodle 2.0. See [[Backup 2.0]] for details.</p>
This page should explain what can be seen on the <u>moodlesite.com/files/index/backupdata.php</u> page
just before starting the restore process
The actual restore process should be explained [[backup/restore|here]]




''unfinished''
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. 


If you have backup files you wish to restore to the system, click on this button.
The backup and restore process is a common way of moving or, copying specific courses from one Moodle to another.




Make sure you are logged into Moodle and looking at the new (usually empty) course into which you want to transfer materials.  
==Restoring a course==
In the Administration menu block, click on Restore...
[[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.
#Click the Restore link opposite the file you want to restore.
#On the next page, click Yes to the question "Do you want to continue?" to start the restore process.
#Click the Continue button at the bottom of the next page, listing details of the backup.
#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.
#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]]).
#Select course users if you are including user data (option only available for users with the capability [[Capabilities/moodle/restore:userinfo|moodle/restore:userinfo]]).
#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.
#Click the Continue button.
#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.


Click on Upload a file.
Restoring a course from a back-up file saved on a local computer:
Click on Browse... and locate the backup file you had created above and saved to your desktop (or other location).  
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.
Choose the backup file you had made and then click Upload this file. You should receive the message "File uploaded successfully."


If you receive a message stating the file is too large to be uploaded, please contact root@stolaf.edu and let them know which course you are backing up and which course it needs to be restored to and they can transfer the backup file for you. Do not continue with these instructions until you hear back from root.  
''Note'': In Moodle 1.8.11 and 1.9.7 onwards, hashed user passwords are no longer saved in backup files containing user data. If a backup is restored to a new site, users will be asked to go through the "forgot my password" routine the first time they log in.
Click on Restore.  
When asked whether you want to continue, click Yes.  
The details of your backup will be displayed. Click on Continue.
In the Restore to: selection box, choose whether to delete the materials in the current course first or to add materials to any existing materials. The default -- and recommended -- option is to add data/materials to the current course.
Click on Continue.
Click on Restore this course now! The restoration process will begin. Allow it to continue until you see the message "Restore completed successfully."  
Click on Continue.
In the Administration menu block, click Files...
Click on the backupdata folder.
Click the small check-box in front of the backup file name you created. From the With chosen files... pull-down menu, choose Delete completely.


==Role mappings==
The procedure of restoring a 1.6 or older course to a 1.7 site requires additional role mapping information to be entered (on page 3). Since Moodle 1.7 has a dynamic roles system, it is possible to map the old roles (i.e. editing teachers, non-editing teachers and students) onto any new roles. By default, Moodle 1.7 looks for legacy roles to map intelligently, for example students in 1.6 are mapped onto the 1.7 legacy student role.


When asked to confirm whether you want to delete the backup file, click Yes.  
When restoring a 1.7 course to a 1.7 site, Moodle compares the role shortname string and pre-selects the same for you. As a result, if you are restoring within the same site, you don't have to worry about selecting what roles to map onto.
You may now customize the materials for the new course/term. Don't forget to update due dates, availability of quizzes, etc.
 
Role options are determined by what you can assign in the current context (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 a course from the site files==
 
The [[Site files|site files]] folder may be used for uploading a course backup zip file prior to restoring it. For security reasons, in versions of Moodle prior to 1.9.6 it is recommended that the backup file is deleted immediately after restoring it. In Moodle 1.9.6 onwards, backup files should be saved in the secure backupdata folder only.
 
==See also==
 
*[[Course backup]]
*[[Roll courses forward]] (in Moodle 1.7 onwards) how to repeat a course again
*[[Import course data]] or parts of your other courses (in Moodle 1.6 onwards)
*[http://www.youtube.com/watch?v=mR9bsPBBWls Video showing how to restore a course backup file in Moodle]
*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=90624 upload course & use?] forum discussion
 
[[Category:Backup]]
 
[[fr:Restauration]]
[[ja:リストア]]
[[es:Restaurar_un_curso]]
[[ca:Restaurar_un_curs]]
[[de:Kurswiederherstellung]]

Latest revision as of 20:26, 23 November 2010

Note: Course backup and restore has been completely rewritten for Moodle 2.0. See Backup 2.0 for details.


Courses can be restored from a backup made by Moodle. Course backups are usually stored in the backupdata folder within the course files folder. There is a restore link next to every course backup.

The backup and restore process is a common way of moving or, copying specific courses from one Moodle to another.


Restoring a course

The backupdata folder
Restoring a course - page 1
Restoring a course - page 2
Restoring a course - page 3

To restore a course from a backup file:

  1. Either upload a backup zip file to your course files area or click Restore in the Course administration block to access the backupdata folder.
  2. Click the Restore link opposite the file you want to restore.
  3. On the next page, click Yes to the question "Do you want to continue?" to start the restore process.
  4. Click the Continue button at the bottom of the next page, listing details of the backup.
  5. 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.
  6. Choose which activities you want to restore and whether to include user data (option only available for users with the capability moodle/restore:userinfo).
  7. Select course users if you are including user data (option only available for users with the capability moodle/restore:userinfo).
  8. 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.
  9. Click the Continue button.
  10. On the next page, click the "Restore this course now!" button.
  11. 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: 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.

Note: In Moodle 1.8.11 and 1.9.7 onwards, hashed user passwords are no longer saved in backup files containing user data. If a backup is restored to a new site, users will be asked to go through the "forgot my password" routine the first time they log in.

Role mappings

The procedure of restoring a 1.6 or older course to a 1.7 site requires additional role mapping information to be entered (on page 3). Since Moodle 1.7 has a dynamic roles system, it is possible to map the old roles (i.e. editing teachers, non-editing teachers and students) onto any new roles. By default, Moodle 1.7 looks for legacy roles to map intelligently, for example students in 1.6 are mapped onto the 1.7 legacy student role.

When restoring a 1.7 course to a 1.7 site, Moodle compares the role shortname string and pre-selects the same for you. As a result, if you are restoring within the same site, you don't have to worry about selecting what roles to map onto.

Role options are determined by what you can assign in the current context (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 a course from the site files

The site files folder may be used for uploading a course backup zip file prior to restoring it. For security reasons, in versions of Moodle prior to 1.9.6 it is recommended that the backup file is deleted immediately after restoring it. In Moodle 1.9.6 onwards, backup files should be saved in the secure backupdata folder only.

See also