Moodle migration

Moodle migration

https://elearningindustry.com/4-handy-tips-for-moodle-migration

Moodle migration and moving the Moodle from one server to another does happen frequently. The reasons may involve security concerns, No official support from Moodle and most importantly leveraging the new functionalities provide by latest updates. The recent Moodle 2.6 release comes with some stunning new features for teachers, administrators and students. Moodle 2.6 SCORM has also been updated with extensive support. Moving Moodle from one server can also increase speed and performance if properly planned, which improves the scalability of Moodle to a new level. Although there are two ways of doing migration, the listed tips come in really handy and assist in a proper migration of Moodle on whole.

Enable Maintenance Mode It is the first and foremost job that you don’t allow any one login during the migration. Setting up the Moodle site on maintenance mode prevents any new additions or modifications made to the Moodle database. Maintenance mode really comes in handy giving the administrator the option to leave the Moodle site inaccessible to the public while developing the site. In general it is good for Moodle administrator to know how to access maintenance mode that can also be used when diagnosing problems within the Moodle site.
Enable Maintenance Mode
Backup Moodle databaseHaving Moodle backup everyday into a tape is a good practice. Not being able to back up important information of students, such as contacts, fee details and enrollments can have catastrophic results for learning management. Having backup in place can help in mitigating the loss of important information. As a standard process, it is in best interest for the learning management to have a backup and recovery systems as part of a disaster recovery plan Moodle migration. The following code below allows to back up the MySQL database. If you are not much into programming, you can follow simple steps listed here for backups created with mysqldump or phpMyAdmin.
Backup Moodle database
Copying Right DirectoriesIt is very essential to copy the MOODLEDATA folder from the previous install as a backup. Once the migration takes place we need to check the values in the code pointing towards to right directories. It is advised to upgrade from 1.9 – 2.1, then 2.2 to 2.5 followed by 2.6, it eliminates the files to be corrupted in the process of migration.
Copying Right Directories
Editing the Configuration files The last lap of moving Moodle from one server to another is crucial. Many important steps needs to be check listed and ticked ok before you proceed further. Most importantly moodledata permissions need to be reviewed and new server needs to be pointed towards the corresponding URL. Editing the config.php is the paramount of Moodle migration. Browse the code to find the config.php file and update details correctly, this is where most of the migrations fail.
Editing the Configuration files

Migrating a complete Moodle site – method 1

This involves moving a whole site from one server to another. If you are changing the domain/IP address to the new server you need to do these steps:

Maintenance mode. Place your current Moodle site in maintenance mode to prevent any further additions to the Moodle database. Don’t let administrators login during the migration as they are not affected by the maintenance mode setting.
Backup your current Moodle database. Do this by following the instructions in the upgrading Moodle or Site backup page. This will give you a text file containing the mysql dump.
Copy the Moodle software. You will need to copy the Moodle code itself to the new server – upgrade the code to the latest version if you can.
Change

$CFG->wwwroot

. In your (possibly new) Moodle directory, change the

$CFG->wwwroot

variable in the config.php file for the new server.
Copy data directory contents (moodledata). Copy the contents of your data directory (check for the value in

$CFG->dataroot

) to the new server.
Review moodledata permissions. Check also that permissions remain the same on the new dataroot folder and change the value if you have changed its location on the new server.
Change your Moodle URL. If you have a new URL, you’ll need to change this in the Moodle database to the new server. This is needed as links to pictures, files, etc are stored as absolute links and will reference the old

$CFG->wwwroot

value. So when loading a mysql backup dump of the Moodle server into mysql on another server the absolute referenced links will be broken. There are two methods of doing this:

(a) The first method changes the Moodle URL using the Moodle script replace.php while your site is currently running just before you backup the Moodle database. Point your browser to yourserver.com/admin/tool/replace/index.php or in older versions http://yourserver.com/admin/replace.php

Enter the url for your old server (http://oldserver.com/) and new server (http://newserver.com/) and it will fix the mysql tables. You will also need to clear out any cached links by restarting your webserver. Now, take another backup of the Moodle database – this one will have the correct URLs.

(b) The second method is to backup the Moodle database first, then use the search and replace feature of your text editor (or use a unix tool like sed) to replace the old URL with the new one in the mysql backup file. Here is an example sed command:

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *