If you try this, backup/restore is a mess!!

If you try this, backup/restore is a mess!!

by Ger Tielemans -
Number of replies: 9
Living with a polluted database, we had the plan to migrate from 1.4.3+ to 1.6.1 in one clean backup/restore swing.

After a spoiled holiday i can say: THIS IS NOT POSSIBLE!!

  • First we discoverd that workshop was broken:
                               so we recreated workshops manually
  • Then we discovered that the tags for quiz were changed in the backup:
                              so we used the php/xml library Domit! to changes the number tag names of qtype into real names, by crowling the xml tree
  • Then the real mess began: the way quizzes are restored in 1.6.1 is complete diffent from 1.4.3 (extra instances on two places, etc... and it is nowhere documented, to complex for trial and error
  • Restore in 1.5.3 did not solve the problemes (we could try first 152..)
  • We now try to copy the content to a new 1.4.3 server and do the internal incremental backup as all you wise people do..
  • Running out of time I clean the old 143 datanbase (internal backup/restore) and have to decide to work for at least one season with the old 143+ not supported version.
What is wrong is that restore for 1.6.1 has not the option to choose the version you want to import and then creates missing info with default params.

It limits the exchange of courses between moodle owners in a dramatic way: you now only can exchange with users of the same Moodle version.. sad
Average of ratings: -
In reply to Ger Tielemans

Re: If you try this, backup/restore is a mess!!

by David Jackson -
Hi Ger,
Our Moodle has successfully evolved from 1.3 to the current 1.6.1+. I cant say we have ever tried upgrading an installation using the method you described. I am curious to know why you did so rather than backing up your database and moodledata manually, installing a clean 1.6.1 and pointing it at your database. This usually does a good job of figuring out which modules/features need upgrading and fixes up the database for you.
What do you mean by polluted database?
Dave
In reply to David Jackson

Re: If you try this, backup/restore is a mess!!

by Ger Tielemans -
with polluted I mean:

  • I added extra tables for other moduls/blocls and hacks
  • I extended choice to have more choices
  • I cloned choice to have limited choice (long before release 1.6.1)
  • I added extra fields for monitoring activity progress
  • I once added just one field to fix a hanging version upgrade (So that was when we ended up with 1.4.3+
After that we had a server upgrade and we had this terrible server performance problem.  (see the forums, never found a real big error that fixed it all in ope step, just ltle by little it got better.)

Now performance and course backup/restore size is ok: I have a backup record from some teacher of 1.3G

(Only restore is not always succesfull: sometimes I can revive a hanging restore by forcing MySQL to repair its tables in another windwwhsome programmer removed from tables a ket when he found double keys, but forgot which one..

Copy our 143+ to a clean 143 was not succesfull...
(Copy the complete 143+ and the database+ folders to a clean machine works, so that is where we start our experiment: I have 10 days left before students are coming back to school, the teachers are jumping on my back now one by one..)
In reply to David Jackson

Re: If you try this, backup/restore is a mess!!

by Samuli Karevaara -
Did you upgrade to gradually? I've had no problems with gradual updates either. A bigger step like from 1.3 to 1.6.1 might cause mild headaches, haven't tried and probably won't smile

But restoring old backups (the course zips) to recent versions usually is a lot of trouble. I was reported that some of our 1.4-backups didn't recreate the course contents. It was from unmodified Moodle 1.4. I've also tried some old backups from the Moodle Exchange but they didn't work so I gave up.

+1 for the C-64 also cool, I still have an almost working one! A backup machine already broke, must surf the eBay some day. First "real" coding experiences were to type in assembly code as numbers directly to the memory. No copy-paste, not much changes in moving the code around, so a lot of NOPs here and there to allow for the code to bloat big grin
In reply to Ger Tielemans

Re: If you try this, backup/restore is a mess!!

by Martín Langhoff -
Hi Ger!

You're a bit crazy, but we can try help you anyway. Can you restore from your database backup? As in, your MySQL-level backup? From there, you can probably undo all the changes that made your 1.4.x non-normal, and upgrade...
In reply to Martín Langhoff

Re: If you try this, backup/restore is a mess!!

by David Jackson -
I shall leave this in your capable hands Martin. After reading both yours and Ger's profiles I realize I am but a pidgeon, offering the hawks advice on soaring.

ps I believe I will be meeting someone from Catalyst this/next wednesday to help us (St Cuthbert's College) out with our little moodle hatchling.
In reply to David Jackson

Re: If you try this, backup/restore is a mess!!

by Martín Langhoff -
Hi David!

Don't you shy away. It may just be that Ger and I are good at writing profiles, that's all wink I'm with a bit of a nasty cold, so I think Mike O'Connor is arranging/rearranging things for the meeting. Enough that I am acting as a vector here in Wellington and spreading the cold in the office. Expanding that to the commuter plane and greater Auckland doesn't seem very responsible (and I feel rather unwell too).

{ Go C=64! I cut my teeth on one of those too! smile }
In reply to Martín Langhoff

Re: If you try this, backup/restore is a mess!!

by Ger Tielemans -
I was also thinking along these lines.. to backup and restore on the same server, to end up with clean coursefiles:

single backup works for all the files with exception of one, so we killed that one at last..

We now tried gradually upgrade form 143 to 152.. it was a mess...

I have now a backup of all the courses and had a smalltalk with some teachers:
  • I can upgrade without quizzes (and workshops) from these backups form 143 to 161..
  • We have to insert the quizzes by hand...
  • ..unless someone has A SCRIPT for extracting quizzes from the 143 XML and put it in a gift import...
  • After four years of magic they now think that I am a human like them...

 Maybe I try that next week with Domit!.. (unless someone is quicker smile)
In reply to Ger Tielemans

Re: If you try this, backup/restore is a mess!!

by Ger Tielemans -

..or has someone a script for extracting quizzes from the MySQL database on a course base? (Martin L?)

.. and then rework it to a gift import?

In reply to Ger Tielemans

Re: If you try this, backup/restore is a mess!!

by Ger Tielemans -
OK, final progress report:

  1. We made a backup of all the courses
  2. We could restore with exception of workshop and quiz
  3. we created workshops again (handwork)
  4. we created quizzes again but we could import the questions in gift format (one quiz at a time, but it was acceptable)
  5. we now are up and running 1.6.1, thanks for all the help and tips