I am wondering if I am backing up all of the database, courses, course files, etc. when I use the backup feature.
I ask because when I last moved my moodle install I had to do a mysqldump and also move the moodle data folder. I am wondering if both are done for the automated backup.
I want to make sure that if my server was to die, I could restore the enirety of my server into a different moodle install. (Here's to hoping that I don't have to actually do that soon!)
Yes, it would be nice to know exactly what is backed up with the "BackUp" feature in Moodle.
I also would like to know how to just do nightly backups of the entire site
- data directory
- database associated with that site
- Is it possible to do this with just one "CRON" or is a special script needed?
- Someone in one of the other threads asked about a script wihich would email backups to another server. Does anyone know anything about this as well.
Hope someone responds.
You can include dbsender in your crontab, or you can visit it manually from time to time just by typing in it's address.
wget -o log.txt -np -m ftp://username:email@example.com/private/moodledata wget ww.olvrode.be/moodle/admin/dbsender.php
all the recently changed files are downloaded to my pc
the database gets mailed to me
"....have a lot of customisations and hacks that you want to keep... " Jan Dierckx
Thanks for such an extensive and thorough response.
Dear Jan Dierckx
Thannks very much for the backup tips.
I have the dbsender going, in my webspace for the time being. It is really useful. A complete copy of my database came to me just like that. It was a quite a thrill.
I will put another copy of dbsender in a folder in my home directory (above public_html) and ask my sysadmin to set up a cron.
The WGET thing is intersting as well. I think that you are using it to go and GET the backupfiles created automatically by moodle.
I guess that as well as downloading things it can also simply click (ping? cron?) urls hence the reason for the dbsender URL being in the WGET command file. I would like to do the same to avoid having to ask my system administrator to set up a cron task but I would like to be able to password protect my dbsender (using .htaccess and .htpasswd) . In fact that is my first task.
I don't suppose you or anyone would happen to know of another php script that would be able to upload and restore the backup? As it stands I would have to ask my system administrator to restore.
Thanks for telling us about these useful tools.
I can't seem to download the WGET from either of the two official sites.
It has take more than 30 minutes and it seems to have stopped half way.
Does anyone know where else I might wget my hands on one?
I spoke too soon,
seems to work for me. I have not installed it yet though.
By the way, it seems that WGET has a way of specifying a password and username so I can leave the dbsender in my web directory in a password protected folder.
1-What exactly does the database contain vis-a-vis the course and site files?
2-I "think" I performed a backup of my database through my Cpanel a couple days ago-wound up downloading a file called moodle.gz. Is that a backup of the database?
Dear N. Hansen,
1 I am not 100% sure about the course files but I presume that they are NOT included in the database backup.
2 The moolde.gz does sound like the zipped database, created for you by CPANEL.
Although is true the course backup files contains all the necessary info to restore courses at any moment, the quickest way to recover an entire Moodle site (or to move it to other server) is to copy everything (database, moodle dir and moodledata dir) and store them in a safe place at regular intervals.
You can find some useful info about this in:
"backup moodle" link.
Hope they help...ciao