backup/restore a Moodle course
Only people with administrator or instructor rights can use Backup/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 Import function serves a similar but limited purpose. Click here to view the KB article on using Import.
- Restore/Backup of a large site may slow down the server; therefore it is recommended to Backup/Restore only sites smaller than 100MB during the peak hours (9am-9pm).
- Look at Files under the Administration 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/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. Backup Course:
- Go to the source course website
- Go to Settings (under the Administration block) and check for any special course settings (such as an Enrollment Key) and make a note of these. They will need to be added 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 settings:
• “Metacourse” (if present): “No”,
• “Users”: “None”, and
• “User Files”: “No”.
- At the bottom of “Backup role assignments for these roles”, select “None”.
- Click “Continue”. The next two screens will show a summary of your backup. Verify that all the information is correct and 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 “Action” column).
- Click the backup file and Save it to a location on your computer where you will be able to find it.
- Before leaving the source course website, delete the backup.zip file that you created. Otherwise, any subsequent backups of the course will include your original backup.
B. On your local hard drive:
- Check if the backup file is larger than 1GB. If it is, unzip the file, move the large files to another folder to reduce the total size well below 1GB, and then re-zip the folder. You will upload these files separately at a later point.
C. In the target course website:
- Click “Restore” in the Administration block.
- Click “Upload a file”, “Browse” to where you saved the backup file, and select it. Click “Upload this file”.
- Under the “Action” column, click “Restore”. (Do not click on the file name itself. This will prompt you to download the file.)
- Click “Yes” for “Do you want to continue?” This may take some time.
- A summary of the Course restore will appear. Review one last time to make sure everything is correct, then click “Continue”.
- Important: In the “Restore to” field, choose “Existing course, adding data to it”. (The default will restore into a brand-new course site.)
- Make sure of the 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”,
• “Users”: “None”,
• “Groups and groupings”: “Groups and groupings” (otherwise you may get a public/private mismatch error in the later phase),
• “User Files”: “No”.
- Check the “Role mappings” to be sure that the source and target roles are consistent. For example, if the source role is Instructor, the target role should be the same.
- Click “Continue”. Scroll to the target course and select it. On the next screen click “Restore the course now”. The restoring process may take a few minutes.
- When the process is complete, click “Continue” at the page bottom. You 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.
- Verify that all resources you want to be private are set as Private Course Materials. (To change the public/private setting on an item, turn editing on and click on the lock icon next to each item.)
- Check the site for internal links that are broken (e.g. images 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: 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.