Advice needed

Advice needed

by Annie Price -
Number of replies: 4

Hi Folks,

Hoping someone can give me advice and information.  We have been with moodle since 1.2 and are now on 2.2.  I think in that time the database has been clogged up so before moving to 2.3 I would like some questions answered if possible.

I think the best option would be to install 2.3 and restore backups from 2.2 (this will be on a different server).  Do you agree?

I have never done a backup and restore as we have never needed to and have always simply upgraded so I am rather nervous about taking this option.

Is it possible to restore the courses into 2.3 make sure everything is working correctly before restoring students and their work?  Or does this have to happen at the same time?

We have meta courses which use assignments, forums and glossaries all of which contain HTML.  Does anyone know if the HTML will be preserved or not?

Is there anything I need to watch out for on restoring meta-courses (in fact do I restore the course or the meta course or both)?

Can anyone think of anything I've missed that I need to be aware of?

Many thanks for any help you can give.

Average of ratings: -
In reply to Annie Price

Re: Advice needed

by Jeffrey Jones -

Annie:
       I feel your pain! We just did an upgrade to 2.2 on a system we'd been bringing forward since probably about 1.4.
       Whether your "restore archives" is a good idea (it certainly will work, up to a point -- see below) depends on how big your site is. We had probably 20,000 registered users and something like 2,000 course shells, so that approach was simply not our idea of a good time... (!) Here's what we did.

  1. We created an "opt-in" procedure for identifying courses to retain (we notified all teachers, told them if they didn't let us know, their course(s) would not be brought forward).
  2. Any course not identified in #1 was deleted in the weeks leading up to the upgrade.
  3. We ran a fresh install of 2.2 just to see what the data structure looked like.
  4. We upgraded (1.9.17 to 2.2.3 - this was early June).
  5. We then modified the resultant data structure to match the fresh install. There are threads and tools you can find in Moodle.org's forums to help.

It all worked as planned. We've had some problems since then, but nothing related specifically to the upgrade, as far as I can tell. Whether you do the above depends on the geek support you can deliver or leverage, of course. Upgrading in place, then moving the resultant data elsewhere, is certainly possible.
       I'll attempt to answer some of your specific questions...

  • If you're going to try to maintain student work in courses, you have to have your users already in the database in the exact same manner in which they existed in 2.2. Otherwise, the restored course archives will fail to connect students with their activities and the content therein.
  • HTML files will make the trip just fine, is my guess.
  • Meta-course definitions depend on references to existing course #s - if you're restoring from archives, your "enrollment methods" will be retained, but the specific meta-connections will be lost. Shouldn't take long to restore. See above about any student content in them.

And, of course, none of the above problems will happen if you simply upgrade.
       Again, my advice is an upgrade, and data structure audit to deal with the wretched excesses of your long upgrade chain.
       Good luck!

Average of ratings: Useful (2)
In reply to Jeffrey Jones

Re: Advice needed

by Annie Price -

Hi Jeffrey,

Thanks so much for the response.

Erm, we have just 15 courses and less than a hundred students so definately not on the scale that you are dealing with.

Geek support - me!  It's been learn as I go along since the courses first started online.  I am ok with following instructions for installs and upgrades and I know enough HTML to make the assignment instructions look pretty.  However, when it comes to touching a database I honest to god quake in my boots - I was terrified when doing the database changes for 1.9 - 2.0 and would prefer never to have to touch a database again.  We all have our achilles heels smile

The reason I was considering the backup and restore route is that the site seems incredibly slow despite trying everything I can to improve it and following all instructions on here.  My students are starting to harrange me about the speed!  So I thought a new database might just solve this problem.

In reply to Annie Price

Re: Advice needed

by Annie Price -

I have just noticed something very peculiar too ...

In my web admin panel when I went to back up this evening it said the database is 91MB and yet the backup file is 28MB - the file extension is .sql

Given the difference in sizes do I presume that the files are somehow zipped/squashed or is there a massive problem here?

In reply to Annie Price

Re: Advice needed

by Colin Fraser -
Picture of Documentation writers Picture of Testers

Part of the backup process is to compress data. The .sql file is actually a text file that you can use to restore your database as it was when the file was created, very handy too. Thinks like images and other files stored in the moodledata folder are not included in the .sql file but the paths to them are. The table structure in the database takes up a lot more room than it does in the .sql file, it is only a line of text for each field in the file. So no it is not an issue. 

To restore the .sql file, open something like phpMyAdmin and upload the file, and see what phpMyAdmin can do with it.