Backing Up Moodle to the Cloud

Moodle Architecture

Visual depiction of the rotating Moodle architecture

I have a plan to back up Wheaton’s Learning Management System (LMS) to the cloud on a yearly basis. I talked about the basics of this architecture in my post I <3 Redmine and You Will Too.Essentially each academic year I will rotate a years worth of Moodle into the cloud, only keeping the current year and the previous year.  Here’s a picture to give you a little help in understanding.

So now I need to find a way for people that are not me to access the Moodle that lives in the cloud.  The problem is that every moodle has a config file, and in that config file, Moodle asks you to specify the URL for where your Moodle is located, this is slightly problematic because:

  1. Amazon EC2 servers are not given IP addresses, they are given a Public DNS like
  2. Technically they can be assigned to an IP address but Elastic IPs cost money when they aren’t being used, and frankly I would rather not have to pay extra if I don’t have to.
  3. The people accessing these Moodles can’t be expected to ssh into a server and change the config file.

So I need to make this happen automagically when the server starts up.  I tried using the php variable $_SERVER but I got some weird things.  So my idea is to have a start up script call the public-hostname (using the API amazon provides) and then edit the config file.  That way when the server starts up, Moodle will automagically be available.

3 thoughts on “Backing Up Moodle to the Cloud

  1. I’m intrigued. A commercial version of this, or it as a easy to set up Moodle addon would be a huge benefit to a lot of sites. Hope you’ll share more about your success/tries in making the Moodle backup available to more users. -Joe

    • Rosalyn Metz on said:

      Each year is on its own server, so rotating isn’t really a problem for us. I find that putting each year on its own server makes it easier to handle upgrades, getting rid of users and files, and also helps limit the amount of maintenance I have to do with MySQL.

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>