This article explains how to migrate your Moodle to Enterprise LMS. My objective here is to migrate the entire Moodle including theme, plugins, users and course data from my Moodle to eLMS. I need SSH (command line) access to my Moodle for this to work because i need to backup the current Moodle database and FTP that database backup and the “moodledata” directory over to eLMS.
First sign up at “https://portal.enterpriselms.com” and then log in.
Create a new Moodle instance and leave it empty – don’t log in and configure it because we’re about to overwrite it with our migrated data. I’ve called my new Instance “moodle-ex1” which eLMS calls “moodle-ex1.cloud-elms.com”. We can use a DNS CNAME later on to call it something like “moodle-ex1.example.com”.
Once you’ve created the new Instance, expand it and click the Edit button. Uncheck the box saying “eLMS managed code”. I don’t want eLMS to manage this Instance because they’d replace my Moodle code-base with theirs and my plugins would go missing. That’s Moodle’s fault, not eLMS’s.
Now the migration part. Click on the “Migration” tab at the top of the eLMS page. The Migration page explains how to migrate and the steps needed. Most import is the username and password you need to use when FTP’ing the Moodle data and database.
My FTP credentials and other details look like this:
Hostname: ftp-syd1.enterpriselms.com Username: ftp80002 Port: 2222 (SFTP, recommended) or 21 (FTP + "explicit SSL") Password: nottelling SFTP link: sftp://ftp80002:[email protected]:2222 FTP link: ftpes://ftp80002:[email protected]:21
I’ve used “lftp” for my FTP client to migrate the “moodledata” directory and it’s contents:
nohup lftp -e "mirror --reverse /var/moodledata /migration/moodle-ex1/" ftp80002:[email protected] &
And i’ve done the following to backup and migrate the Moodle MySQL database:
mysqldump -u moodle -p moodleDatabase | gzip -1 > /tmp/database.mysql.gz nohup lftp -e "put -O /migration/moodle-ex1/ /tmp/database.mysql.gz" ftp80002:[email protected] &
I’ve used “nohup” and the tailing “&” so i can leave the FTP process running long after i’ve gone to sleep – i have plenty to upload.
We can proceed with the above FTP processes completed. Go to your Instances (using the navigation Tab at the top of the eLMS page) and expand the Moodle instance you created earlier (click the down-arrow to the right of the Instance).
Click the Restore button. A new page shows your restore options. In the “Source Type” drop-down list, select “Migration / FTP Upload”. In the “Upload Name” drop-down list, select the migration to import. We’re essentially restoring from “our” backup rather than an eLMS backup.
Click the Proceed button and confirm your choice. You might have to wait a little if you have a large Moodle. Click the “refresh” button on the Instances page every now and then to see if it’s done.
When done, you should be able to visit the new Moodle Instance by navigating to “moodle-ex1.cloud-elms.com” – or whatever you called yours.