From 4d55f46b0f828fbda2307fd81e7f3b10f9df49fc Mon Sep 17 00:00:00 2001 From: moodler Date: Fri, 1 Aug 2003 02:32:45 +0000 Subject: [PATCH] More details on backups --- lang/en/docs/faq.html | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/lang/en/docs/faq.html b/lang/en/docs/faq.html index e3f7f66c09..77af7ae14d 100644 --- a/lang/en/docs/faq.html +++ b/lang/en/docs/faq.html @@ -406,6 +406,7 @@

After performing any of these fixes it might be a good idea to drop all the tables in your database and re-install again from scratch.

+

I can't log in - I just stay stuck on the login screen.

The most common cause for this is that your own computer (not your Moodle server) @@ -418,23 +419,20 @@ properly on the server. You can test this by calling the script http://yourserver/moodle/lib/session-test.php.

-

How do I backup my Moodle site?

- -

The Unix commands are as follows: -
-cd /backup/moodle.org (substitute your appropriate directory) -
-mv moodle-database.sql.gz moodle-database-old.sql.gz (keep an old copy) -
-mysqldump -h moodle.org -u username --password=moodlepass -C -Q -e -a moodle > moodle-database.sql -
-gzip moodle-database.sql (to compress the new one) -

-For the files: -
-rsync -auvtz --delete -e ssh username@moodle.org:/home/moodle/ /backup/moodle.org/moodle/ -
-You're done.

+ + +

How do I backup my whole Moodle site?

+ +

There are two main things you need to make a copy of: the database and the uploaded files. The Moodle scripts themselves are less important, since you can always download a fresh copy if you have to.

+ +

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

+

cd /my/backup/directory

+

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

+

gzip 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 mysshusername@example.com:/my/server/directory /my/backup/directory/

+

 

-- 2.39.5