Note: You are currently viewing documentation for Moodle 3.7. Up-to-date documentation for the latest stable version of Moodle may be available here: Upgrading.

Upgrading: Difference between revisions

From MoodleDocs
Line 21: Line 21:


=== Your database ===
=== Your database ===
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":
mysqldump moodle > moodle-backup-2002-10-26.sql
You can also use the "Export" feature in Moodle's optional "Database" web interface to do the same thing on all platforms.


== Install the new Moodle software ==
== Install the new Moodle software ==

Revision as of 15:35, 2 July 2005

Moodle is designed to upgrade cleanly from any earlier version to any later version.

When upgrading a Moodle installation you should follow these steps:


Backup important data

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.

There are three areas that need backing up:

The Moodle software directory itself

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

Your data directory

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.

Your database

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":

mysqldump moodle > moodle-backup-2002-10-26.sql

You can also use the "Export" feature in Moodle's optional "Database" web interface to do the same thing on all platforms.

Install the new Moodle software

Using a downloaded archive

Using CVS

Finishing the upgrade