mirror of
https://github.com/moodle/moodle.git
synced 2025-01-22 08:11:26 +01:00
125 lines
5.6 KiB
HTML
125 lines
5.6 KiB
HTML
<head>
|
|
<title>Moodle Docs: Upgrading</title>
|
|
<link rel="stylesheet" href="../theme/standard/styles.php" type="TEXT/CSS">
|
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
<style type="text/css">
|
|
<!--
|
|
.sectionheading {
|
|
font-size: medium;
|
|
font-weight: bold;
|
|
font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
|
|
border: 1px dotted;
|
|
padding: 10px;
|
|
background-color: #EEEEEE;
|
|
}
|
|
-->
|
|
</style>
|
|
</head>
|
|
|
|
<body bgcolor="#FFFFFF">
|
|
<h2>Upgrading Moodle</h2>
|
|
|
|
<p>Moodle is designed to upgrade cleanly from any earlier version to any later
|
|
version. </p>
|
|
<p>When upgrading a Moodle installation you should follow these steps:</p>
|
|
<h3 class="sectionheading">1. Backup important data</h3>
|
|
<blockquote>
|
|
<p>Although it is not strictly necessary, it is always a good idea to make a
|
|
backup of any production system before a major upgrade, just in case you need
|
|
to revert back to the older version for some reason. In fact, it's a good
|
|
idea to automate your server to backup your Moodle installation daily, so
|
|
that you can skip this step.</p>
|
|
<p>There are three areas that need backing up:</p>
|
|
<blockquote>
|
|
<p><strong>1. The Moodle software directory itself</strong></p>
|
|
<blockquote>
|
|
<p>Make a separate copy of these files before the upgrade, so that you can
|
|
retrieve your config.php and any modules you have added like themes, languages
|
|
etc<strong><br>
|
|
</strong></p>
|
|
</blockquote>
|
|
<p><strong>2. Your data directory.</strong></p>
|
|
<blockquote>
|
|
<p>This is where uploaded content resides (such as course resources and
|
|
student assignments) so it is very important to have a backup of these
|
|
files anyway. Sometimes upgrades may move or rename directories within
|
|
your data directory.<strong><br>
|
|
</strong></p>
|
|
</blockquote>
|
|
<p><strong>3. Your database</strong></p>
|
|
<blockquote>
|
|
<p>Most Moodle upgrades will alter the database tables, adding or changing
|
|
fields. Each database has different ways to backup. One way of backing
|
|
up a MySQL database is to 'dump' it to a single SQL file. The following
|
|
example shows Unix commands to dump the database called "moodle":</p>
|
|
<blockquote>
|
|
<p><font face="Courier New, Courier, mono">mysqldump moodle > moodle-backup-2002-10-26.sql</font></p>
|
|
</blockquote>
|
|
<p>You can also use the "Export" feature in Moodle's optional
|
|
"Database" web interface to do the same thing on all platforms.</p>
|
|
<p> </p>
|
|
</blockquote>
|
|
</blockquote>
|
|
</blockquote>
|
|
|
|
<h3 class="sectionheading">2. Install the new Moodle software</h3>
|
|
<blockquote>
|
|
<p><strong>Using a downloaded archive</strong></p>
|
|
<blockquote>
|
|
<p>Do not overwrite an old installation unless you know what you are doing
|
|
... sometimes old files can cause problems in new installations. The best
|
|
way it to rename the current Moodle directory to something else, then unpack
|
|
the new Moodle archive into the old location.</p>
|
|
<blockquote>
|
|
<p><font face="Courier New, Courier, mono">mv moodle moodle.backup<br>
|
|
tar xvzf moodle-1.1.tgz</font></p>
|
|
</blockquote>
|
|
<p>Next, copy across your config.php and any other plugins such as custom
|
|
themes:</p>
|
|
<blockquote>
|
|
<p><font face="Courier New, Courier, mono">cp moodle.backup/config.php moodle<br>
|
|
cp -pr moodle.backup/theme/mytheme moodle/theme/mytheme</font></p>
|
|
</blockquote>
|
|
</blockquote>
|
|
<p><strong>Using CVS</strong></p>
|
|
<blockquote>
|
|
<p>If you are using CVS, just go into the Moodle root directory and update
|
|
to the new files:</p>
|
|
<blockquote>
|
|
<p><font face="Courier New, Courier, mono">cvs update -dP</font></p>
|
|
</blockquote>
|
|
<p>Make sure you use the "d" parameter to create new directories
|
|
if necessary, and the "P" parameter to prune empty directories.</p>
|
|
<p>If you have been editing Moodle files, watch the messages very closely
|
|
for possible conflicts. All your customised themes and non-standard plugins
|
|
will be untouched.</p>
|
|
</blockquote>
|
|
<p> </p>
|
|
</blockquote>
|
|
<h3 class="sectionheading">3. Finishing the upgrade</h3>
|
|
<blockquote>
|
|
<p>The last step is to trigger the upgrade processes within Moodle.</p>
|
|
<p>To do this just visit <a target=_top href="../admin/index.php">the admin page of your
|
|
installation</a>.</p>
|
|
<blockquote>
|
|
<p><font face="Courier New, Courier, mono">http://example.com/moodle/admin</font></p>
|
|
</blockquote>
|
|
<p>It doesn't matter if you are logged in as admin or not.</p>
|
|
<p> Moodle will automatically detect the new version and perform all the database
|
|
or filesystem upgrades that are necessary. If there is anything it can't do
|
|
itself (very rare) then you will see messages telling you what you need to
|
|
do. </p>
|
|
</blockquote>
|
|
<p> </p>
|
|
<p> Assuming all goes well (no error messages) then you can start using your new
|
|
version of Moodle and enjoy the new features!</p>
|
|
<p>If you have trouble with the upgrade, visit <a target=_top href="http://moodle.org/">moodle.org</a>
|
|
and post on the <a target=_top href="http://moodle.org/mod/forum/view.php?id=28">Installation
|
|
Support Forum</a> in the Using Moodle course.</p>
|
|
<p> </p>
|
|
<p> </p>
|
|
<p align="CENTER"><font size="1"><a href="." target="_top">Moodle Documentation</a></font></p>
|
|
<p align="CENTER"><font size="1">Version: $Id$</font></p>
|
|
|
|
</body>
|
|
</html> |