Here is my take on backups. The Moodle built-in backup system works but it is very slow and sometimes it fails for lack of resources. Instead what I do is backup the SQLdatabase and the moodle directories using terminal commands.
Here is what works for me. There are three things to backup:
- The SQL database
- The userdata directory
- Moodle code (This only changes when you upgrade Moodle or add features.)
I'm showing you the commands that are specific to my installation on a Centos system, a Hostmonster VPS account. You will need to adapt these to your specific installation.
What's good about this approach is that its fast. My setup has 150 students and two courses. The time to back everything up is about five minutes. The time to restore from backups is also about 5 minutes.
I hope this helps...
Peter Halverson
Command line backup of my Moodle database
mysqldump -p -u halverph halverph_mdle2 > halverph_mdle2.sql
Command line backkup of moodle user data
tar cvf moodledata.tar ~/moodledata (verbose) OR tar cf moodledata.tar ~/moodledata (non-verbose)
Command line backup of moodle code directory
tar cvf moodle.tar ~/public_html/moodle (verbose) OR tar cf moodle.tar ~/public_html/moodle (non-verbose)