Skip to content

Commit

Permalink
More details on backups
Browse files Browse the repository at this point in the history
  • Loading branch information
moodler committed Aug 1, 2003
1 parent 76a8a32 commit 4d55f46
Showing 1 changed file with 15 additions and 17 deletions.
32 changes: 15 additions & 17 deletions lang/en/docs/faq.html
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -406,6 +406,7 @@ <h4 class="question"><a name="noadmin"></a>During the initial setting-up process
<p class="answer">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.</p> <p class="answer">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.</p>





<h4 class="question"><a name="nologin"></a>I can't log in - I just stay stuck on the login screen.</h4> <h4 class="question"><a name="nologin"></a>I can't log in - I just stay stuck on the login screen.</h4>


<p class="answer">The most common cause for this is that your own computer (not your Moodle server) <p class="answer">The most common cause for this is that your own computer (not your Moodle server)
Expand All @@ -418,23 +419,20 @@ <h4 class="question"><a name="nologin"></a>I can't log in - I just stay stuck on
properly on the server. You can test this by calling the script properly on the server. You can test this by calling the script
http://yourserver/moodle/lib/session-test.php.</p> http://yourserver/moodle/lib/session-test.php.</p>


<h4 class="question"><a name="backup"></a>How do I backup my Moodle site?</h4>


<p class="answer">The Unix commands are as follows: <h4 class="question"><a name="backup"></a>How do I backup my whole Moodle site?</h4>
<br>
cd /backup/moodle.org (substitute your appropriate directory) <p class="answer">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.</p>
<br>
mv moodle-database.sql.gz moodle-database-old.sql.gz (keep an old copy) <p class="answer">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</p>
<br> <p class="answercode">cd /my/backup/directory</p>
mysqldump -h moodle.org -u username --password=moodlepass -C -Q -e -a moodle > moodle-database.sql <p class="answercode">mv moodle-database.sql.gz moodle-database-old.sql.gz</p>
<br> <p class="answercode">mysqldump -h example.com -u myusername --password=mypassword -C -Q -e -a mydatabasename > moodle-database.sql</p>
gzip moodle-database.sql (to compress the new one) <p class="answercode">gzip moodle-database.sql</p>
<br><br> <p class="answer">For the files, you can use rsync regularly to copy only the changed files to another host:</p>
For the files: <p class="answercode">rsync -auvtz --delete -e ssh mysshusername@example.com:/my/server/directory /my/backup/directory/</p>
<br>
rsync -auvtz --delete -e ssh username@moodle.org:/home/moodle/ /backup/moodle.org/moodle/
<br>
You're done.</p>


<h2>&nbsp;</h2> <h2>&nbsp;</h2>


Expand Down

0 comments on commit 4d55f46

Please sign in to comment.