Quantcast
Channel: Backup and restore
Viewing all articles
Browse latest Browse all 6511

Re: Nightly full site backups

$
0
0
by Peter Halverson.  

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:

  1. The SQL database
  2. The userdata directory
  3. 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)


Viewing all articles
Browse latest Browse all 6511

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>