Do I need to do course backups when I have DB backups?

Do I need to do course backups when I have DB backups?

by james mergenthaler -
Number of replies: 1

What I mean is if I have bi weekly DB backups of my entire moodle DB, do I need to do course backups too?

We have a process where students complete courses and enrollments are removed about every 20 weeks.  I have in the past spend a lot of time creating course backups to keep records of student activities in the course (forum posts, quiz scores, uploaded assignment files). 

I can't see a good reason to continue to do course backups if I can restore the DB to a test moodle instance and find what I need there.  As long as a recent moodledata folder is in place for the test moodle instance that I am restoring the DB too.

Am I missing something here?  Does DB backup + moodledata folder = any # of individual course backups?

Thank you for insights . opinions on this process.

Average of ratings: -
In reply to james mergenthaler

Re: Do I need to do course backups when I have DB backups?

by Floyd Saner -

James,

There are three components to a Moodle installation:

1. The Moodle code

2. The Moodle database

3. The Moodle data and course content files, usually in a directory named moodledata, which is outside the public_html directory.

You can always download Moodle code from moodle.org, so that is not much of an issue.  However, if you have custom code or a lot of plugins it makes life easier to backup the Moodle code.

In order to restore Moodle, you need to have a backup of the database and moodledata. The database contains many links and references to files in moodledata, so you really need a backup of both at the same time. If a student uploads a document as an attachment to an assignment or forum post, a reference is made in the database, but the linked file is stored in moodledata.

The benefit to having individual course backups is that you can easily restore an individual course.  Suppose someone accidentally  deletes a course and all you need to do is restore that one course.  If your only backup is the database and moodledata, you have to restore your entire site in order to retrieve your course.  If, in addition, you have individual course backups, you can easily restore just that one course.

You might want to read through the following documentation:

https://docs.moodle.org/28/en/Site_backup

https://docs.moodle.org/28/en/Automated_course_backup

https://docs.moodle.org/28/en/Backup_and_restore_FAQ

Floyd