A course can be backed-up with some or all of its parts by using the course backup.
Before you begin
- Do you need to copy an entire Course? If yes, go to Step 1 below on how to manually back up a Course.
- Do you need to only copy some of the Courseware and Activities, i.e Assignments, Quizzes from this course? If yes, see how to import/copy courseware and activities from one course to another
Backing up a Course Manually
- Go to Administration > Course administration > Backup
- Initial settings – Select activities, blocks, filters and other items as required then click the Next button. Users with appropriate permissions, such as administrators and managers, can choose whether to include users, anonymise user information, or include user role assignments, groups, groupings, user files, comments, user completion details, course logs and grade history in the backup.
- Schema settings – Select/deselect specific items to include in backup, then click the Next button.
- If desired, select specific types of activity to be backed up by clicking the link ‘Show type options’
- Confirmation and review – Check that everything is as required, using the Previous button if necessary, otherwise click the Perform backup button
- Complete – Click the Continue button
Setting an Automated Course Backup Schedule
- Go to Administration > Site administration > Courses > Backups > Automated backup setup
- Set backup_auto_active to enabled
- Select the days of the week to run the backup
- Set the execution time for the backup process. For most servers, early morning will be the best time. Keep in mind the time zone your server is using.
- Set the “Save to…” path. If you can, choose a backup path on another machine or on a different drive than the one Moodle is on. You don’t want to lose your backups at the same time you lose your Moodle site if the drive fails. If you leave the field blank, then backup zip files will be saved in the backup folder of each course files folder. On a Linux server the path might look like: /home/(your user or domain)/public_html/archive/ or if it’s below the publicly accessible folders: /home/(your user or domain)/archive/ if the path is not recognized a red X is shown after saving, otherwise a green check.
- Set all other options appropriately.
- Click the Save changes button.
Restoring a Course Backup
- 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.)
- 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