backup/restore a Moodle course
Only people with administrator or instructor rights can use backup/restoreBackup/Restore functions on CCLE/Moodle. One can use the backup/restore functions in the Administration block to copy the course content
1) from the archive server (Moodle 1.8) to the production server (Moodle 1.9), or
2) from one course to another on the same server.
Please note that the importImport function serves a similar but limited purpose. Click here to view the KB article on using Import.
- Restore/
backupBackup of a large site may slow down the server;therefore,therefore it is recommended tobackup/restoreBackup/Restore only sites smaller than 100MB during the peak hours (9am-9pm). InspectLook at Files under theAdministration→FilesAdministration block on the source course before you start the backup. If there are any unusually large files, you may want to move them to your local drive first and then upload them to the target site later manually after the restore process.- Please remember to delete the backup files (.zip) on both the source and destination sites after the
backup/restoreBackup/Restore process is complete because those files are no longer needed and may take up considerable space.
Scenario #1: The target course has an SRS number and automatically pulls participant data from the Registrar (e.g., a regular UCLA course).
Most times we don’t need to migrate the user data/files, and the target course already exists. We thus will follow the steps below.
A. AtIn the source course websitewebsite:
CheckGo to Settings (under the Administration block) and check for anyabnormalspecial coursesettingsettingsor(suchhugeasfileansize.EnrollmentMakeKey) and make a note of these. They will need toyourselfbewhenaddednecessary.to the new course once it has been restored. You may wish to print the Settings page for reference.- Click “Backup” (under the Administration block). By default all Resources and Activities are included, but no User Data is included. Uncheck any materials you do not want to back up. Normally User Data (which includes student files, submissions, forum postings, glossary entries, etc.) does not need to be brought in, but you may select User Data if desired.
- Make sure of the
following:following“None”settings:
for “User Data”, “No” for• “Metacourse” (if present): “No”,
• “Users”: “None”for “Users”, and
“No” for• “User Files”: “No”. - At
changethethosebottomsettingsofunless“Backupnecessary.role assignments for these roles”, select “None”. - Click “Continue”. The next two screens will show a summary of your backup. Verify that all the
wayinformationtillisyou’recorrecttakenand click “Continue” until you arrive at the Files > backupdata area. - If you want to see a summary of your backup data, click “List” (under the “
Files”Action”area.column). - Click the backup file and
saveSave it to a location on your computer where you will be able to find it.
B. On your local hard drive.
B. At your local hard drivedrive:
- Check if the backup file is larger than 1GB. If
yes,it is, unzip thefile andfile, moveoutthe large files tocutanother folder to reduce the total size well below1GB ,1GB, and then re-zip the folder. You will upload these files separately at a later point.
C. AtIn the target course websitewebsite:
- Click “Restore” in the Administration
block,block. - Click “Upload a file”, “Browse” to where you saved the backup file, and
uploadselecttheit.zipClickfile.“Upload this file”. - Under
titlethe “Action” column, click “Restore”. (Do not click on thezipfile(Ifname itself. This will prompt youclickto“List” instead, you’ll seedownload thecontent of the zip file).file.) - Click “Yes” for “Do you want to continue?”
It’llThis may takeasomewhile.time. ClickA summary of the Course restore will appear. Review one last time to make sure everything is correct, then click “Continue”.ForImportant: In the “Restore to” field, choose “Existing course, adding data to it”. (The default will restore into a brand-new course site.)- Make sure
“None”offorthe following settings (some of these settings will not be able to be changed, depending on the settings chosen during the backup process):
• “User Data”: “None”,
• “Metacourse”: “No”,
for• “Metacourse”,Users”: “None”,
for “Users”,• “Groups and groupings”for: “Groups and groupings” (otherwiseyou’dyou may get a public/private mismatch error in the later phase),
and “No” for• “User Files”: “No”. BrowseCheck the “Role mappings” tocheckbeifsure that the source and target roles are consistent. For example, if the source role isadministrator,Instructor, the target role should be the same.- Click “Continue”.
ChooseScroll to therighttargetcourse,course andthenselect it. On the next screen click “Restore the course now”. The restoring process may take acouple offew minutes. - When the process is complete, click “Continue” at the page bottom.
You’llYou will then be taken to the course front page. - If you have moved out any file from the original backup folder at B1, go to the Files area and upload it.
CheckVerify that all resources you want to be private are setto theas Private CourseMaterials groupingMaterials. (ThereToshouldchangeathe public/private setting on an item, turn editing on and click on the lock icon next to eachitem).item.)- Check the site for internal links that are broken (
ie.e.g.Imagesimages inside webpages, wikis, books, etc. or links to other areas within your course). Front page links to resources and activities should be fine (unless you have altered the course shortname).
Scenario #2#2:: The target course has no SRS number (e.g., a collaborative or test site).
We often want to keep the user data/files and create a new course on the prod server. To do the backup/restore, we go through Steps A1-C11 as in Scenario #1, with the following exceptions:
- Find a shell course (e.g. your test site) on the prod server to perform the “restore” function.
- At Steps A2 & C5 choose the right settings to suit your specific needs.
- At Step C4, choose “New course” for the “Restore to” field and specify the category of the new course.