moodle/doc/upgrade.html
2002-10-29 15:02:09 +00:00

111 lines
5.1 KiB
HTML
Executable File

<HEAD>
<TITLE>Moodle Docs: Upgrading</TITLE>
<LINK REL="stylesheet" HREF="../theme/standard/styles.css" TYPE="TEXT/CSS">
</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>
<h2>1. Backup important data</h2>
<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 &quot;moodle&quot;:</p>
<blockquote>
<p><font face="Courier New, Courier, mono">mysqldump moodle &gt; moodle-backup-2002-10-26.sql</font></p>
</blockquote>
<p>You can also use the &quot;Export&quot; feature in Moodle's &quot;Manage
Database&quot; web interface to do the same thing on all platforms.</p>
</blockquote>
</blockquote>
</blockquote>
<h2>&nbsp;</h2>
<h2>2. Install the new Moodle software</h2>
<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.0.6.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 &quot;d&quot; parameter to create new directories
if necessary, and the &quot;P&quot; 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>&nbsp;</p>
</blockquote>
<h2>3. Finishing the upgrade</h2>
<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>&nbsp; </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.com/">moodle.com</a>
and post on the <a target=_top href="http://moodle.com/mod/forum/view.php?id=28">Installation
Support Forum</a>.</p>
<p>&nbsp;</p>
<P>&nbsp;</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>