A course can be saved with some or all of its parts by using the course backup. Typically, the site administrator will set a schedule of automated course backups for the whole site. Automated course backups runs the same functions as individual course backups. It’s a good idea to schedule backups for when your server isn’t usually busy. Running the backup tool over all the courses can be processor-intensive, so you shouldn’t run it when there are a lot of students trying to access the server. You should always alert users with an announcement on the first page that if they log on during the backup hours they may notice a decrease in performance.
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.
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
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