Wednesday, November 14, 2012

Migrating a moodle 1.8 instance to 2.3 instance

I have a customer that contacted me recently about us taking over the hosting of their moodle content.  Are we now a "moodle provider", a moodle hosting company?  After a couple emails it was clear to me what had happened.  Organization a had hired a moodle person once upon a time and they had set up a moodle 1.8 instance on their own server, not a 3rd party provider.  That person left and they have been treading moodle water for a couple years.  They are an educational group and are using moodle primarily for on-line courses in the nursing and business areas. 

What they were really after was moving their content from their server to our server and still administering it. They wanted to be using the most recent moodle instance, but did not have the ability or confidence in upgrading their own server.

I talked it over it over a bit with my colleague and we decided the first step would be to have them create an account on their 1.8 server so we could log in and take a look around.  I have not seen a moodle 1.8 instance.  The things I wanted to see was how many active users on the site, how many users in the role of teacher or course creator and how many site administrators.

I set up a new moodle 2.3 instance on one of our servers here and created a couple accounts and assigned them administration rights.  My colleague backed up a course from their server and attempted to restore it to our 2.3 instance.  We were reminded that

moodle can not restore from 1.8 - 2.x.

I needed to set up a moodle 1.9x instance to restore the moodle 1.8 backup to first.  Then I could backup from the 1.9 instance and restore to the 2.3 instance.

These are my steps to set up the temporary 1.9 instance

  1. Created a directory called rd in the www root of the moodle server
  2. Downloaded the latest moodle 1.9x from moodle download server
  3. Copied the download to my /serverDownloads folder off the root of the c drive of the server
  4. Unzipped the download into a new temp directory in the /serverDownloads folder
  5. Opened the newly created moodle folder in my temp folder
  6. Copied all the contents
  7. Pasted the contents into the rd folder in the www directory of the server
  8. Opened phpMyAdmin on server
  9. Created a new empty database called rd - I could have called it bob.
  10. Created a Vhost definition in my httpd-vhosts.conf file that points into my newly created temp19 folder in my webroot
  11. Browsed to the folder in the web root, like this 10.2.28.9/rd  - this is the ip address of the server, not needing to be visible from the web, just to use internally on our network.
  12. Upon browsing to the root - moodle takes over and starts its installation of the 1.9 instance. This is where I specify the DB instance from step 9 and the user name and password to connect to the DB.  Moodle then creates all the tables.
When I was complete, I had a newly minted 1.9 instance where I could unzip the backup files from the moodle 1.8 instance.


You can see the categories and the courses that I restored from the moodle 1.8 instance.

This is our 2.3 instance where were restored the 1.9 backups.




Moral of the story?  Moodle 2.3 is far to different, especially in the underlying DB to allow you to restore a course from a very old moodle instance like 1.8.

No comments:

Post a Comment