Installation help

 
 
Picture of curt bixel
Simple Upgrade from 2.2 to 2.4
 

I have poked around on the forums and moodle docs a bit, but was not able to answer my question.  Perhaps someone here can either answer it or point me in the right direction.  Here is the question.

Would deleting moodle 2.2 completely from my website, installing a fresh copy of moodle 2.4, and then restoring the only two existing and small courses from backups.  Would this be a quick and simple way to upgrade, considering their are only two small courses hosted on my site.  

I have only 90 users total.  

 
Average of ratings: -
Picture of curt bixel
Re: Simple Upgrade from 2.2 to 2.4
 
By the way, I have fixed the UTF-8 thingy using the help provided earlier. THANK YOU!
 
Average of ratings: -
Picture of Ken Task
Re: Simple Upgrade from 2.2 to 2.4
Group Particularly helpful Moodlers

It sounds like the 'path of least resistence', however, would advise that (regardless of how small the courses are), restore process had better work ... bringing across all accounts/student work, grades, etc. ... or ?

Normally, I'd recommend installeing a 'sandbox 2.4' on same server, but that might be a little too much.

Sooooo ... one could test restores of courses rather easily (maybe) by installing a laptop version of 2.4 Moodle.  Get it running.  Then backup your 2.2.x courses, download the backups, and restore to the laptop version of 2.4.

Then you know for sure (or as sure as one could be, I guess)! ;)

'spirit of sharing', Ken

 
Average of ratings: -
Picture of JD Moodle
Re: Simple Upgrade from 2.2 to 2.4
 

I have poked around on the forums and moodle docs a bit, but was not able to answer my question.  Perhaps someone here can either answer it or point me in the right direction.  Here is the question.

Would deleting moodle 2.2 completely from my website, installing a fresh copy of moodle 2.4, and then restoring the only two existing and small courses from backups.  Would this be a quick and simple way to upgrade, considering their are only two small courses hosted on my site.  

I have only 90 users total. 

There are a ton of moodle docs on this, but essentially:

  1. Get a dump of your current database using MYPHPADMIN.  Save it to a folder on your laptop.
  2. Zip up your entire moodle site and dump that into the folder on your laptop.
  3. At this point you are insured that if things go fubar you can go back to 2.2. (and restoring from backups have stalled for me causing much sadness)
  4. Now delete everything on your site except for the config file.
  5. Now upload the 2.4 moodle into your site.
  6. Visit your site, and moodle will upgrade the database.
  7. Now add back any hacks, pluggins, etc.

I've had so many bad experiences with the course restore/backup feature, it's really CPU intensive and most hosting services will barf at some point when you run it.

 

 
Average of ratings:Useful (1)
Picture of Isaac Manu
Re: Simple Upgrade from 2.2 to 2.4
 

Hello everyone,

I would like to upgrade Moodle from 2.2 to 2.4 using Git as recommended. I have upgraded 1.9 to 2.2 using CVS and have not used Git. The instruction to upgrade to 2.4 using Git is not very clear.

Has someone successfully upgraded 2.2 to 2.4 without loosing my courses, themes and database configrations? Please share your notes.

 I am running Moodle 2.2 on a Debian Squeeze 6.

Thank you all.

 
Average of ratings: -
Picture of Ken Task
Re: Simple Upgrade from 2.2 to 2.4
Group Particularly helpful Moodlers

@Issac [uhhh, you really should have started a new posting. ;)]

Have taken Moodle 2.2 to 2.4 via git but that was on a system I maintain/manage - a CentOS system.  That's not to say you cannot do same on your system.  2.2 version was upgraded to 2.3 before taking site to 2.4.  Directions below are for CentOS-ese ... translate to whatever Linux flavor you use.

First things first ... do you have git installed?

whereis git

or

git --version

will tell you.

First thing I'd advise is to backup everything ... the moodle code directory, the moodle data folder (one tar ball ought to do it), and a mysql dump of the database.  This becomes your 'fall back' position on any hickup on your system (and that also assumes one can restore the entire site).

Second thing I'd advise is getting your current 2.2 to the highest of that series using git and off CVS before attempting move upwards.

Here's how I suggest getting off of CVS and taking site to the highest of 2.2 - the first step.

As root user, and at the same folder level as your current Moodle web root folder (on a CentOS system /var/www/html/ (on a Debian box that might be different and in the following commands you might have to prefix them with 'sudo') get the moodle code for the highest in the 2.2 series into a 'moodlegit' folder:

cd /var/www/html/ (currently active moodle web folder is in here)

git clone git://git.moodle.org/moodle.git moodlegit

Above creates a 'moodlegit' folder for you.

cd moodlegit

git branch --track MOODLE_22_STABLE origin/MOODLE_22_STABLE

git checkout MOODLE_22_STABLE

cp ../moodle/config.php .

(this copies the config.php file from the current moodle folder into the moodlegit folder [don't leave off the '.' above].)

chown apache:apache ../moodlegit -R

cd ../

mv moodle moodle.back

mv moodlegit moodle

IF you have any add-ons/theme additions, etc. one can copy them from moodle.back into the appropriate directory of the new moodle directory.

Example:

cp -rp moodle.back/blocks/addedblock moodle/blocks/

This copies recursively and keeps ownerships/permissions.

or for a theme:

cp -rp moodle.back/theme/myadded_theme moodle/theme/

Hit your moodle site with a browser and login.  You should be thrown into upgrading to the highest 2.2.x available.

When one gets to the check page, if you have forgotten to get some add-on, you'll see 'missing from disk'.  Go to command line again and use the cp -rp moodle.back/[whateveritem] method to get those items missing.  Don't forget to reload the check screen.  Everything checks out?

After you have throughly tested the new git site, it would be safe to move the moodle.back folder into an archive.

**Test everything** before the next step.  If there is something not working, fix it now!!!!

Everything working?  Then run another full backup ... moodle code directory, moodle data folder, and mysqldump of the DB.

Process is the same for taking 2.2.x to 2.3.x following the same steps and the only thing different are the two lines pertaining to version.  For 2.3.x ...

git branch --track MOODLE_23_STABLE origin/MOODLE_23_STABLE

git checkout MOODLE_23_STABLE

and finally to 2.4:

git branch --track MOODLE_24_STABLE origin/MOODLE_24_STABLE

git checkout MOODLE_24_STABLE

After each upgrade and testing ... make a full backup!

After each upgrade and testing ... make a full backup!

After each upgrade and testing ... make a full backup!

Uhhh, did I mention to make a full backup after each upgrade and testing? ;)

'spirit of sharing', Ken

 
Average of ratings: -
Picture of Visvanath Ratnaweera
Re: Simple Upgrade from 2.2 to 2.4
Group Particularly helpful Moodlers
Yes, the ton must be the problem!
;-(

What is wrong with http://docs.moodle.org/24/en/Upgrading_to_Moodle_2.4 ?
 
Average of ratings: -
Picture of curt bixel
Re: Simple Upgrade from 2.2 to 2.4
 

@ Visvanath


What is wrong with http://docs.moodle.org/24/en/Upgrading_to_Moodle_2.4 ?


Nothing is wrong with it.  I read the whole thing and started to work through it.  The problem is that I have pretty much no experience running a moodle server.  It was easy to install the standard package for 2.2 on my own server space and then start rebuilding my class which was lost by my school district.  Now, however, for upgrading we are talking about backing up databases, testing on non-production servers,  making the new code readable by the server etc.  

This would probably take about 2 minutes for someone who knows what they are doing. 

I am simply asking if the sheer smallness of my site (one hosted class with 90 students) would provide me an alternative way to upgrade that would mimic the ease of my original basically one-click installation of 2.2.  

By, the way, I appreciate the answers you have given to this and other questions I have asked.  These forums have made it possible for me to again provide my students with quality resources online.  

 

 
Average of ratings: -
Picture of Bret Miller
Re: Simple Upgrade from 2.2 to 2.4
Group Particularly helpful Moodlers

For the most part, upgrading is not a simple experience because very few people run Moodle in a  completely native setup with no extra plugins, themes or customizations. If you do, the chances are good that you can "just upgrade". Before doing so, I would backup your course with all user data so that should something go wrong, you can "simply" wipe it all, install the standard package and restore your 1 course to the new install.

We are also fairly small, but have a lot more courses so we find the backup, migration and testing essential to the upgrading process. Even then, we've been caught by plenty of bugs in this last 2.3.x round. Internally, we're all Windows, but Moodle is hosted offsite and was my first experience with Debian, Apache and MySQL. It took some time to work everything out, but now I've scripted migration from live to test site, backups and upgrades. So every upgrade, I just have to verify things haven't moved and make any tweaks required to the scripts and run them. I haven't had an upgrade fail to work since my first tests with 2.0.x.

I say all that to point out that it is learnable. But for 1 course, simply backing up that course and its data might be enough. Keep in mind that the Front Page is separate from the course, so you might need to back that up too and record any settings you changed from default.

 
Average of ratings:Useful (1)
Picture of Visvanath Ratnaweera
Re: Simple Upgrade from 2.2 to 2.4
Group Particularly helpful Moodlers
Hi

I perfectly understand that you need to get your procedure scrutinized.

You wrote:
> Get a dump of your current database using MYPHPADMIN. Save it to a folder on your laptop.
Correct.

> Zip up your entire moodle site and dump that into the folder on your laptop.
You have to be careful here. There are two directory trees involved:
1. Moodle software (For example, everything in server/htdocs/moodle)
2. Moodle uploaded files (For example, server/moodledata)
http://docs.moodle.org/en/Upgrading_to_Moodle_2.4#Backup_important_data

> At this point you are insured that if things go fubar you can go back to 2.2.
Not until you have tried going back when the way forward is still uncut.
wink

> Now delete everything on your site except for the config file.
I would delete the Moodle software (point 1. above) but leave uploaded files intact.

> Now upload the 2.4 moodle into your site.
Yes, that replaces the Moodle software you've deleted in the previous step.

> Visit your site, and moodle will upgrade the database.
Not yet. You need to copy the old config.php into the new Moodle directory first.

P.S. As Bret wrore earlier there is an alternative:
1. http://docs.moodle.org/22/en/Course_backup
2. Setup a new 2.4 site
3. http://docs.moodle.org/24/en/Course_restore
 
Average of ratings: -
Picture of Rick Jerz
Re: Simple Upgrade from 2.2 to 2.4
Group Particularly helpful Moodlers

Curt,

I think that I know what you are going through, but maybe not.

1) It appears that you installed your Moodle using your server's one click install, right?

2) My guess, then, is that you really haven't modified Moodle much with add-ins, or am I wrong?

If I am correct about 1 & 2, then your problem is that you simply do not know how to upgrade your Moodle to a current version?  Am I correct, or am I off-base?

If I am seeing your situation correctly, they you are (almost) correct that someone who knows what they are doing could do the upgrade in 2 (not really, but maybe 20) minutes.

I think that you are getting some good guidance from others here, but what I see happening is that the way you do your upgrade depends upon how much risk one wants to take.  One method would be to just do the upgrade and hope that it works.  The other method is to get the newest version of moodle running, then move your existing data to it.  I have learned how to do Moodle upgrades fairly fast, but whenever there is a new "point" upgrade for Moodle, I am much more conservative.  For example, in my case, I have installed a (somewhat) mirror install of my production Moodle (2.3.3+).  Just the other day, I tried upgrading it to 2.4, and actually ran into some problems.  I did get Moodle 2.4 running, but found that it had a few problems with a few features.  Very soon, these problems will be fixed (two of the three are already fixed) and then I will upgrade my production site.  Of course, before upgrading, I will make sure that I have backups of everything.

But based upon what you have written, none of this will immediately help you because you are not comfortable doing your own administration, and there is not one-button install routine for you to (safely) upgrade your Moodle.

So, if anything that I have written makes any sense, the basic question is where does this leave you?  Stranded?  Maybe so.  Of course, if you could find someone to come over and help you, this would be best.  Or you might need to find a nearby Moodle administrator to help you. Or you need to continue pursuing some help here, and see if you understand anything that we are saying.

I'll ask you a few basic questions.

1) Do you know how to FTP to your site? 

2) Do you know how to SSH to your site?

Your answers to these questions might help us know what kind of advice to give you.

In summary, I hope that my assessment is not too far off-base.  If it is, I apologize.  I was simply sensing some frustration in your posts.

I hope to be upgrading my Moodle from 2.3.3+ to 2.4 soon.  Maybe when I do, I too can make a video showing how I did this.  You can also find other people's approaches (videos) on YouTube.

 

 
Average of ratings:Useful (2)
Picture of Visvanath Ratnaweera
[rant] Upgrade mania or forced upgrades?
Group Particularly helpful Moodlers
Rick

I agree that the upgrade is a river crossing for the administrator. The better equipped you are, higher are the chances of a safe landing on the opposite bank.

That is of course obvious. But I know of a generation of Moodle administrators who did exactly that, upgrading without a second thought. They get the notice from the moodle.org announcements list about an upgrade. CSV or unzip the new version over the old one, kick the web-based upgrade routine, that's it. Some did it on Monday morning as the first thing!

This went unnoticed except in the very rare occations, where something went wrong and the backup needed to be replayed.

That is not a Christmas carol - a true story just a couple of years ago. How is it today?

P.S. I have unsubscribed myself from this forum. I hope the creators too take a break over the festive season to have a look at the current state of their creation.

P.P.S. Talking of river crossings, it is the 200 year aniversary of the fateful crossing of Berezina.
 
Average of ratings: -
Picture of Rick Jerz
Re: [rant] Upgrade mania or forced upgrades?
Group Particularly helpful Moodlers

Visvanath, your help has been appreciated.  Hope to see you around in other forums.

In general, upgrading my moodle has been pretty painless.  When I first started upgrading, I did this somewhat blindly because I did not know other ways.  I closed my eyes, and it worked!  But then I learned how to be more cautious, making backups, just in case.

There was one major challenge along the way, from 1.9 to 2.something.  When I did this, I decided to start a new Moodle site for version 2.something.  Now, I am even more cautious, even with 2.3.3+ to 2.4.  I much prefer the cautious approach instead of the blind approach.

I usually try to do major upgrades, either Moodle or severs, between semesters.  Also, I have learned to leave my production Moodle site alone and experiment with additional copies, which I have learned to install.  I remember talking with a Moodle administrator two years ago at the California Moodlemoot.  He was very surprised when I told him that I had only one install of Moodle.  Now, I have around six installs for different purposes.

 
Average of ratings:Useful (1)
Picture of Alberto Ferreira
Re: [rant] Upgrade mania or forced upgrades?
 

Rick

 

Thanks for your testimony.

 

Can you explain me how can I create a copy of my prodution moodle?

 

TIA

Alberto

 
Average of ratings: -
Picture of Bret Miller
Re: [rant] Upgrade mania or forced upgrades?
Group Particularly helpful Moodlers

Create yourself a new subdomain site for testing.
Create yourself a new database for your test site.
Follow the Moodle Migration instructions to COPY your production site to your test site:

http://docs.moodle.org/23/en/Moodle_migration

 
Average of ratings:Useful (1)
Picture of Rick Jerz
Re: [rant] Upgrade mania or forced upgrades?
Group Particularly helpful Moodlers

You said it better than I.  Thanks.

One more link, however:

http://docs.moodle.org/24/en/Moodle_migration

 

 
Average of ratings: -
Just wondering . . .
Re: [rant] Upgrade mania or forced upgrades?
Group Particularly helpful Moodlers

Visvanath, Rick, Ken, Howard (etc) I also thank you for your posts.  I've not dabbled in servers, and I probably won't.  I just buy space from someone who knows what they are doing and is reasonably set up in fee structure.  The forums have got a little hot over on linked in on this same topic. 

But as of yesterday I'm into GIT, since I need to test Alex's new 2.4 version of course menu. 

I'm offline for at least a week as far as Moodle goes, unless I tinker with GIT.  May you all get well rested whatever part of the global New Year cycle you are in. 

-Derek

 

 
Average of ratings: -
Picture of curt bixel
Re: Simple Upgrade from 2.2 to 2.4
 

Rick,

Thanks for the post.  I think you are pretty much right on with my situation.  I don't know much about this, but am fairly quick on the uptake.  I have managed to get GIT on my website, use FileZilla to create a copy of my website on my laptop, download a copy of MySQL database using phpAdmin, requested SSH access to my server, and managed to log in.  I am googling commands for SSH, and it reminds me a bit of DOS.  (Don't know how old you are, but its seems there are some similarities between command line stuff in SSH and the original DOS from the 80s.  

Anyway, trying to get a local clone of moodle using GIT seemed to push my server over the 40GB limit.  I deleted the partial clone (I put it in a test space) and am now working on deleting some stuff to make more space.  

This brings up an important question.  I am not really sure how the moodle file repository works.  If I delete a large video file, is it ever really deleted from the database?  I remember in earlier versions of moodle, if I deleted a file, and then uploaded a new file with the same name, it would somehow find the old file and use it.  I was a bit surprised that the old file was still around.  Now, when I delete a video, I notice that the size of my site does not decrease.  This leads me to believe that moodle keeps a copy of it somewhere anyway.  

Any thoughts?

 
Average of ratings: -
Picture of Rick Jerz
Re: Simple Upgrade from 2.2 to 2.4
Group Particularly helpful Moodlers

Curt,

Yes, SSH, which is really UNIX, is a lot like DOS, but different.  You have simple commands like "ls" to list the contents of a directory, but "ls" can have many many modifiers, most whose letters do not relate to what the modifier does.

The current moodle zip (tar) file is less than 40MB.  Yes, MB, not GB, so I don't know how it is pushing you over the 40GB size of your server.  My virtual server is 60GB, and I am using only around 10% of this for moodle (with all my data).

I think you are correct about files remaining somewhere in the repository.  I too have deleted some big files, and my moodledata does not shrink in size.  Maybe someone else can enlighten us about this.  It is one of the thing on my list of things to explore.  Relative to my own videos, I keep these outside of Moodle in order to keep my moodledata directory smaller and easier to backup.

By the way, if you can master SSH, it is much easier and faster to do these installs and upgrades.  For example, I use the following command to get moodle 2.4.  It takes less than a minute:

wget "http://download.moodle.org/download.php/direct/stable24/moodle-latest-24.tgz"

The GIT command looks like this:

git clone -b MOODLE_24-sTABLE git://git.moodle.org/moodle.git

 

 
Average of ratings:Useful (1)
Picture of curt bixel
Re: Simple Upgrade from 2.2 to 2.4
 

The GIT command looks like this:

git clone -b MOODLE_24-sTABLE git://git.moodle.org/moodle.git

 

Rick, I tried this.  I even got to the installation part.  Then it gave me this warning...

 

Installation - Moodle 2.5dev (Build: 20121220)

 
The version of Moodle that you are about to install or upgrade to contains unstable "Alpha" development code that is not suitable for use on most production sites. If this is not what you wanted then you should make sure you are updating from a STABLE branch of the Moodle code. See Moodle Docs for more details.

Moodle 2.5dev (Build: 20121220)

Server checks

 
Average of ratings: -
Picture of Ken Task
Re: Simple Upgrade from 2.2 to 2.4
Group Particularly helpful Moodlers

That git command should have also shown this:

warning: Remote branch MOODLE_24-sTABLE not found in upstream origin, using HEAD instead

Which translated means the 2.5dev version. 

See the small case 's'.  Linux/git is case sensitive

To fix it is easy.  change into the moodle directory that was created when you issued the git command:

git branch -a

Should show you this:

* master
  remotes/origin/HEAD -> origin/master
  remotes/origin/MOODLE_13_STABLE
  remotes/origin/MOODLE_14_STABLE
  remotes/origin/MOODLE_15_STABLE
  remotes/origin/MOODLE_16_STABLE
  remotes/origin/MOODLE_17_STABLE
  remotes/origin/MOODLE_18_STABLE
  remotes/origin/MOODLE_19_STABLE
  remotes/origin/MOODLE_20_STABLE
  remotes/origin/MOODLE_21_STABLE
  remotes/origin/MOODLE_22_STABLE
  remotes/origin/MOODLE_23_STABLE
  remotes/origin/MOODLE_24_STABLE
  remotes/origin/master

The to correct the version:

git branch --track MOODLE_24_STABLE origin/MOODLE_24_STABLE

git checkout MOODLE_24_STABLE

To check: git branch -a should show (see the *):

git branch -a
* MOODLE_24_STABLE
  master
  remotes/origin/HEAD -> origin/master
  remotes/origin/MOODLE_13_STABLE
  remotes/origin/MOODLE_14_STABLE
  remotes/origin/MOODLE_15_STABLE
  remotes/origin/MOODLE_16_STABLE
  remotes/origin/MOODLE_17_STABLE
  remotes/origin/MOODLE_18_STABLE
  remotes/origin/MOODLE_19_STABLE
  remotes/origin/MOODLE_20_STABLE
  remotes/origin/MOODLE_21_STABLE
  remotes/origin/MOODLE_22_STABLE
  remotes/origin/MOODLE_23_STABLE
  remotes/origin/MOODLE_24_STABLE
  remotes/origin/master

To assure yourself you are using the 2.4 version:

fgrep '$release' version.php

from the same directory should show:

$release  = '2.4+ (Build: 20121230)';   // Human-friendly version name

Now finish with web based portion of install.

'spirit of sharing', Ken

 
Average of ratings: -
Picture of Rick Jerz
Re: Simple Upgrade from 2.2 to 2.4
Group Particularly helpful Moodlers

Ken,

I had given Curt both versions of how to download the latest moodle, but quite honestly, I am new to GIT and really haven't used it much.  So I tried the GIT command (as I gave it to Curt), and did not succeed (a slightly different problem than Curt's).  My guess is that I too had downloaded the 2.5dev.  Then, I used my first suggested command (the one I usually use) and succeeded upgrading my Moodle. 

Was my GIT command wrong?  Should the small "s" in sTABLE be a capital "S"?  If one uses the GIT command, must they always do what you suggested above?  Or were your suggestions only provided to fix the problem? 

If one is using the GIT method, must they use both of these lines below?

git branch --track MOODLE_24_STABLE origin/MOODLE_24_STABLE

git checkout MOODLE_24_STABLE

Thanks for your help.

 
Average of ratings: -
Picture of Ken Task
Re: Simple Upgrade from 2.2 to 2.4
Group Particularly helpful Moodlers

Linux/UNIX is case sensitive.  In this case, git is case sensitive and am guessing the repositories are in caps on the git server.

Fix the problem without starting over.

Originally, the Moodle docs on git showed more steps (below).  The [directory] below was not part of the original steps.  I use [directory] because I help manage servers that have multiple instances of Moodle.  Without the  [directory] switch the command will create a 'moodle' directory.  If one desires to look at a fresh copy of the latest/greatest, handy to know and would/might prevent one from wiping out one's current/active moodle.

git clone git://git.moodle.org/moodle.git [directory]
cd [directory]
git branch -a
git branch --track MOODLE_24_STABLE origin/MOODLE_24_STABLE
git checkout MOODLE_24_STABLE

Then the docs changed with the single command (the one you shared).  It is shorter for sure.  Folks won't be using all of those often ... just upon initial install.

Lots to learn ... I normally create a directory at the document root for 'notes' and place little text files there for future reference.

'spirit of sharing', Ken

 
Average of ratings: -
Picture of curt bixel
Re: Simple Upgrade from 2.2 to 2.4
 

Well, I am up an running with git and moodle 2.4.  I seem to be learning a lot here.  I even learned how to change the character encoding from latin_swedish or something to UTF8.  

Unfortunately, I have yet another problem.  I had hoped to get this up and running and then restore a course to the new installation.  I have managed to get the backup file uploaded to the new moodle 2.4 installation.  The backup file is 157 MB which is big, but not really that big.  

I hit restore.  The process starts.  Then the process just keeps running.  

I have noticed that after a while, the APC Host DIagram seems to stop changing, which may be some sort of clue.

 
Average of ratings: -
Picture of curt bixel
Re: Simple Upgrade from 2.2 to 2.4
 

I did some more experimentation, and have determined that PHP is still running.  I have another installation on my website, and doing work there seemed to cause the stats in APC to change, showing PHP activity. 

Anyway, the apc.shim thingy in php.ini is now set to 220, although on the APC Opcode Cache thingy only shows 128, so I imagine this is limited somewhere else.  I also changed the timeout from 300 to 3000.   These are things that have helped in the past, although I do have to say I am a bit over my head here.

 
Average of ratings: -
Picture of Rick Jerz
Re: Simple Upgrade from 2.2 to 2.4
Group Particularly helpful Moodlers

Curt, I tried to simulate your restore situation.  I took a Moodle 2.3 backup, 17MB, and tried restoring it into my low-end hosted server version of Moodle 2.4.  My browser showed activity for more than 30 minutes.  Never an error message, or any other message.  I eventually "Canceled" this, but then noticed that the course was actually installed?

You might try more experimenting.  I was not sure if your 150+MB backup included user data, or if it was all course materials.  If it contains user data, you might first try resetting this course, do the backup, see if it is any smaller, and then restore it.   If you want to preserve user data, create a new course in your Moodle 2.2 from your Moodle 2.2. backup, get rid of user data, backup the "new" course, and see if it restores.  You might also try getting rid of any big video files in the "new" copy, back it up, see if it is smaller in size, and then restore it.

 
Average of ratings: -
Picture of curt bixel
Re: Simple Upgrade from 2.2 to 2.4
 

Rick,

I am in the process of testing the restoration of a smaller course. 15 MB.  It seems to be working.  Perhaps this will help to zero in on the actual problem, as, if this upgrade works, it seems to suggest that simply the size of the course being restored is the problem.  

 
Average of ratings: -
Picture of Rick Jerz
Re: Simple Upgrade from 2.2 to 2.4
Group Particularly helpful Moodlers

Yes, maybe size is the issue on a certain kind of server.  However, if one could focus in on the exact problem, and then replicate this on another system, it might really be a bug.  If so, this should go into the Moodle Tracker system.  So far, we don't have enough information to call it a bug.

 
Average of ratings: -
Picture of curt bixel
Re: Simple Upgrade from 2.2 to 2.4
 

My moodle home page still lists the course as "Course restoration in progress."  I am going to assume that it is "hung" as for 15MB 8 hours should be enough time for a restoration.

 
Average of ratings: -
Picture of Rick Jerz
Re: Simple Upgrade from 2.2 to 2.4
Group Particularly helpful Moodlers

Ken, I did what you said to do and of course, it worked.  Do you build these commands into a script file?  At this point, I still need to understand what each line of your method is doing, but I have to assume that you do these for very good reasons.  Thanks.

I wonder what is the particular advantage to using this GIT approach?  Does it get all of the latest fixes that haven't yet been bundled into the download.moodle.org release?  I know that most of the moodle development folks suggest this GIT approach, but I am still wondering why?  Will the other approach (using wget) go away with time? Is the GIT approach more robust?  Does it do more verification?

 
Average of ratings: -
Picture of curt bixel
Re: Simple Upgrade from 2.2 to 2.4
 

Rick, don't consider me a git expert by any means.  My understanding of git is that it is a program created by the creator of Linux.  The purpose is to make it possible for hundreds of different people to work on all the various pieces and parts of a huge piece of software.  GIT keeps track of everything somehow and makes everything nice or happy or something.  

I am going to go out on a limb and suppose that the moodle development community uses GIT to organize the work on all the various branches of the software.  

This being the case, just one or two simple commands is all it takes to sync your installation up with the most up to date and stable version of moodle.

 

What I don't know is if it allows a simple jump from moodle 2.2 to 2.3  or from 2.3 to 2.4 or whatever.

I am sure that it is the easiest way to keep your version 2.2 up to date with all the latest fixes or 2.3 up to date with all those latest fixes.  

I hope this helps. 

 
Average of ratings: -
Picture of Ken Task
Re: Simple Upgrade from 2.2 to 2.4
Group Particularly helpful Moodlers

Because I encourage the entities to get hands on with newer versions and most entities with whom I work have multiple instances of Moodle on same server, yes, I do have a 'instmdl2' script - which gits the moodle code, creates the data directory for the instance and creates the database as well.  Takes only one parameter ... the name of the moodle instance (the [directory] as mentioned before).

However, once one is installed via git, to update one all one needs to do is to change into the moodle instance directory and type: 'git pull'.  That's it.  Not really worth scripting a simple line like that ... just have to rememeber it.  That being said, however, one could build into that 'git pull' script tar balling the code directory, the data directory, and doing a mysqldump of the DB ... thus backing up everything before updating via git.

Git works like rsync with certain switches ... git gets only the files that have been updated.  So to get the code fix for the issue with Moodle 2.4 for window links + any other issue that has been fixed, it took all of 3-4 minutes at the most (and most of that is stepping through the web interface notifications).  The only other thing is to re-set ownerships of all files since git was issued as root user.

Wget won't go away ... that's just downloading the .tar.gz or .zip file. It's handy to know more than one way ... period.  If there are issues with git for some reason, then the 'fall back' to 'get 'er done' is the 'long way'.

Still use wget on my own server to acquire the latest package (.tar.gz) when the entity firewall am working behind hickups and won't allow Linux servers to acquire the files.

'spirit of sharing', Ken

 
Average of ratings: -
Picture of Rick Jerz
Re: Simple Upgrade from 2.2 to 2.4
Group Particularly helpful Moodlers

Hmmm, issuing a "git pull" (I assume from the moodle directory) and having moodle updated is attractive.  I would imagine that you still need to install add-ins manually, or is GIT smart enough to take care of that too?  When you say that "git pull" can also perform tar balling, I assume that there is some init file somewhere that can modified, like a script file.

Also, I wonder about your "firewall" comment, and whether git is more sensitive to firewalls than wget.

If the git commands are issued as a user, and not root, will the file permissions be correct?

Well, you have given me more things to put on my "list of things to try".  Thanks.

 
Average of ratings: -
Picture of Ken Task
Re: Simple Upgrade from 2.2 to 2.4
Group Particularly helpful Moodlers

From previous post:

all one needs to do is to change into the moodle instance directory and type: 'git pull'.

From previous post:

one could build into that 'git pull' script tar balling the code directory, the data directory, and doing a mysqldump of the DB

Call the script 'update' ... it backs up the moodle instance first ... then runs git pull.  A script is nothing more than a series of commands in a text file - like a batch file of old - something like the following:

tar -cvf /home/backup/mdlback.tar /var/www/moodledata /var/www/html/moodle;

mysqldump -u [dbuser] -p[password] [moodledatabase] > /home/backup/mdlback.sql;

cd /var/www/html/moodle;

git pull;

chown apache:apache * -R;

"firewall" comment

Should have said 'filter' - my bad.   While git does use it's own protocol and uses a certain port,  School districts in Texas must provide filtering.  Some filtering servers see .tar.gz's or traffic like git as something to be blocked.  Git URL's might be blocked by filters.
Has nothing to with git per say as a filter will also deny wgets as well if not configured to allow the server to git/wget/update ClamAV, etc..  Too many of those filters don't take into account Linux servers ... even if they are Linux OS themselves.  There is mention of firewalls in the docs for git on Moodle.org

http://docs.moodle.org/22/en/Git_for_Administrators

git commands issued by user and permissions … while documentation on Moodle.org recommends that or says it can be done, I sometimes have issues with that.  Root user should never be denied and setting permissions/ownership doesn't take but a minute.  Checking permissions/ownerships might be a good thing to do from time to time anyway.

If addons have a git repo (most of them do now), yes, one could fiddle with git to check those for updates as well.  See above url as well.

'spirit of sharing', Ken

 
Average of ratings: -
Picture of Rick Jerz
Re: Simple Upgrade from 2.2 to 2.4
Group Particularly helpful Moodlers

Okay, this is helpful.  It appears to me that with GIT, you have to have more faith that everything will work correctly.  With wget, you get a chance to do the upgrade a little more slowly and in pieces.  Maybe GIT would be more appropriate when the updates are within the same "point" number (2.4.1, 2.4.2, 2.4,3).  wget might be better when moving between major point upgrades (2.4, 2.5, 2.6).

I don't understand the "firewall" comment.  What does this do?

Thanks.

 
Average of ratings: -
Picture of Ken Task
Re: Simple Upgrade from 2.2 to 2.4
Group Particularly helpful Moodlers

How one uses git is a individual preference ... me, I'll attempt to use it all the time - when moving upwards from within a series ... 2.2 -> 2.3 -> 2.4 -> 2.5 etc.  When upgrading not in a series ... the process might be a migration which is not like an upgrade - as folks have been experiencing with the move from 1.9.x to 2.x.  Git might still be used with some part of it.

Git from behind a firewall

Git uses a proprietary protocol and it may be blocked by your firewall (port 9418). If this is a problem, you can use Github's http version https://github.com/moodle/moodle.git. It's a bit slower, so use the Git protocol if you can.

http://docs.moodle.org/22/en/Git_for_Administrators

Every server/workstation that runs more modern OS has it's own firewall now.   Entities in Education/Industry typically do have a network firewall.

https://en.wikipedia.org/wiki/Firewall_%28computing%29

Since you remotely host, may/may not apply in your situation.

'spirit of sharing', Ken

 
Average of ratings: -
Picture of curt bixel
Re: Simple Upgrade from 2.2 to 2.4
 

It seems to hang even restoring just a 15 MB backup file

 

 
Average of ratings: -
Picture of Rick Jerz
Re: Simple Upgrade from 2.2 to 2.4
Group Particularly helpful Moodlers

After you cancel the restore, do you find that the course was actually restored?  Even though mine hung, like yours, the course seems to be restored.

 
Average of ratings: -