In the faq from the moodle documentation, there is the following description:
How do I backup my whole Moodle site?
There are many ways to do such backups. Here is an outline of a little script you can run on Unix to backup the database (it works well to have such a script run daily via a cron task
mv moodle-database.sql.gz moodle-database-old.sql.gz
mysqldump -h example.com -u myusername --password=mypassword -C -Q -e -a mydatabasename > moodle-database.sql
For the files, you can use rsync regularly to copy only the changed files to another host:
rsync -auvtz --delete -e ssh firstname.lastname@example.org:/my/server/directory /my/backup/directory/Kind regards, Ian