I am trying to do upgrade from version 1.4.n to 1.6.3 but it is not working.
I have searched and searched this forum and cannot find a simple step by step guide to upgrade. The moodle docs about upgrade are missing a big part. They only tell you to "backup data", then "install moodle" then that is it. The bits about getting your data and mysql back on site and working appear to be missing.
I DO have backup of whole site. The original site is still working. But client wants upgrade.
I have separate server that I am testing new install on. Original site online and not touched yet (phew, thank god for that)
But when I upload uploaddata and reinstate the mysql via a dump of original all I get are errors, errors, errors. I open the site, it is in admin mode and "updating tables" Then the fun really starts...
"table already exists", "key value duplicated".... etc. Over and over and over.
Then the site is just stuck on the "update tables" screen.
I read on forums to delete tables in such a case, I did this but then just more errors with more tables already exist... on and on and on and on for days now.
Tearing hair out now and even willing to pay somebody to help me.
What I need is a SIMPLE READABLE step-by-step guide to the update process.
It must be readable and understandable with few if any assumptions what I do or do not know. Assume I know very little.
Any, any, any help would save my life now.
The site is real it has many students and my clients are beginning to think I am some kind of sociopathic nut case.
Please, help.... I am dying.
Ok... for a start, please tell us a bit more about your setup. What operating system are you using? Why are you trying to restore your backups at all? Are you moving your moodle site as well as upgrading? If it is a simple upgrade you can follow the upgrade instructions to the letter. Moving a site to (for example) a test server is not (yet) documented, but is rather more complicated that a straight upgrade.
Which particular bits of the upgrade docs are you getting stuck at so we can improve them?
Sorry, it's not yet clear exactly what you are trying to do.
I only want to udpate the site. I did a test run on another server, simply to test and ensure that I did not shut down the real, active site on the students and teachers in there. Good thing I did this otherwise I would have really made a massive mess of things.
My old moodle is version 1.4.n. We want to upgrade it to 1.6.3.
I have backups of the whole site, the site is still active and running. I can get all data down and try again.
1. New install of Moodle 1.6.3
2. O/S = Redhat Linux running Apache 1.3.37 (Unix)
3. MySql version 4.1
4. PHP version 4.4.3
5. Installed new moodle 1.6.3 via fantastico in cpanel
I read the upgrade info, it tells me to:
1. backup moodle software directory (done)
2. backup data directory (uploddata done)
3. backup database (mysql dump done)
4. Then it mentions "use the 'export feature' in moodle's optional 'mysql admin'. I don't have this and have no idea what it is.
5. Then it tells me do NOT overwrite an old installation unless you know what you are doing, which I obviously do not.
6. Then, 'next copy across your config.php, plugins, themes. Did this, only config.php, we use no special plugins so I figured leave mods and such alone. The template I have already updated and it works on v 1.6.3 so I deal with that later, separate issue.
7. Then it goes on to talk about CVS as an option. I did not use this option.
8. Then it goes on to talk a bit about windows servers which I am not using.
9. Then it says "finishing the upgrade", and that the last step is to trigger the upgrade process with moodle by "just visit the admin page of your installation" which I did.
The upgrade instructs stop right there....
Now, it seems to me that the upgrade document says nothing about brining my moodle uploaddata back into moodle nor does it seem to mention what to do / how to do mysql import of old data to new database.
I hope these details make my situation more clear.
You can take a look at the dummy test if you want to see the errors
If you would like to logon as admin I am happy to send you the details to do so.
I think what you are doing is effectively creating a new moodle site using the data from another site (your production site). While I understand why, it isn't the same thing.
You will almost certainly be ok by following the upgrade instructions to the letter to upgrade your production site. If not, you can come and beat me up
Dear Kim Carter
If the courses are not too numerous you might consider using backup and restore. Just backup and download all the course (and site) backups. Create the course categories, upload the backups and restore them on the new system.
Also...It sounds like you have a new installation (including a new database) and you are trying to upload an old database into it. I am not sure what would happen when you over-write the new database with an old one, but that does not sound right. Some of the new tables would not get overwritten, and I guess you would get all those "table already exists messages."
So do not start with a new installation, start with a clone of the old database, and then hook it up to a the files of the new version of moodle, by specifying that old (cloned) database in the new config.php.
The new files will then upgrade and add various new tables to the old database.
Old database + new files = New moodle
New Moodle(including new database) + old database = a mess
Yes, I was trying to (1) install a new moodle and (2) then bring the mysql dump from old site into that directly.
As my post attempted to explain, it is not a good idea to bring your mysql dump into already installed moodle.
You should use the new moodle files to upgrade the old database, or its clone.
Thomas Robb gives instructions below.
I have the same problem here but i need to move moodle to a new server. Old server using mysql v3 and new server installed with mysql v5.
I thinking of using mysqldump to make a backup of the current database and restore in the new server mysql v5. Is this the right way to do it?
Please help, thanks !!
Yes, Dump the database upload it to your new server and connect it to a copy of the moodle software files from the old server (with a suitably changed config.php). Upgrade the software files and the database afterwards, not before like Kim.
I have never used mysql v5 but I don't think it should be a problem. You might also consider trying it out in your desktop first using moodle installer in easyphp and a mysql upgrade. I hope someone tries out Moodle on Wamp5. It comes with MySQL v5 so you should be able to have it running on your desktop with a few clicks.
Is this what you meant?
- Dump mysql database from old server to backup.sql
- Import backup.sql to new server mysql version 5
- Run install.php for moodle 1.6.3+ on the new server with the old config.php
When you say "upgrade the software files and database afterwards", how do i upgrade them afterwards ?
By the way i'm upgrading to Linux SUSE 10 not windows based, so using moodle installer will not be accurate as it's windows based...
Yes, you have the right order there. I hope it is going smoothly.
> When you say "upgrade the software files and database afterwards", how do i upgrade them afterwards ?
My comment was only made in the context of this thread where I think Kim was trying to import an old database into a fully upgraded database. And, I was not sure what version you were using. You have the current stable version so I would wait a bit before you upgrade. Tom describes the process below.
True about SUSE and Windows. WAMP and LAMP are different. Sounds like you have your own server.
Let us know how it goes.
Yes you are right Tim, my school is hosting our own moodle server.
It'll be interested when i upgrade from the old server from moodle 1.5.3+ / mysql version 3 to the new server with moodle 1.6.3+ / mysql version 5.
Upgrade is due in 2 week !! God bless me !!
Thanks for your advise will keep them in mind during the upgrade !!
Backing up the database is only a safeguard in case things really get mucked up. Do it, then forget about the file(s). You probably won't need them.
All you need to do to get a new version up and running using the current database and files is:
1) rename the old moodle directory to something else, for example "moodle-old".
2) put the new directory into place. Unzipping the download places places a new "moodle" directory in the same location as the zip file (and "moodle-old" file).
3) Move the config.php directory from moodle-old to the new "moodle".
(or better, yet, open the old config.php file and while viewing its contents, place the same info in the config-dist.php of the new "moodle". This will preserve any the new optional settings that might be missing from the old config.php file. Save the config-dist.php as "config.php".
4) Move any custom themes and any other special items to the new moodle directory. If you have installed any optional modules, you might have to copy the <module>.php file from the lang/en directory into the corresponding location in the new "moodle" directory.
5) Access the new moodle and log in as admin. It will automatically do whatever updating is necessary. It can do this because now it "knows" where the original database and moodledata files are located.
(If you start the new moodle without setting up the config.php it will go on its merry way creating new tables as you have already found out.)
I hope this helps.
Right now I am at home and on a very slow modem so I will just say here that your follow ups to my post allow me now to understand the major problem I had just understanding WHAT it was I am trying to do.
Now, from reading this thread, I know what it is I am supposed to be doing.
I will do this again tomorrow and follow these advices and I am sure that will be case-closed then.
PLUS I get to learn a lot of stuff, eh?
Thanks for your patience, all of you.
I will, I hope, post on this thread by end tomorrow with a case closed statement
Thank you very much to the people here on this forum who, quite literally, saved my skin (or ass, depending on your slang)
Maybe the Main Moodle Dudes should sticky this thread? Or use Thomas Robbs short and sweet directions in the upload docs? Or even use my ammended version of Mr Robbs advice in the upload docs? I think it may save a few brain cells here 'n there, eh?
I would like to "rewrite" the final advice given me, add a bit about reloading your user uploaded data, that bit was missing for "Complete Dummies" such as myself - and many other users too.
Forum: Please correct me if any advice I give here is misgiven or outright wrong.
My Rewrite of Thomas Robbs advice, thanks Thomas!
Wot I done and wot worked for me:
1) Make sure you have no users logged into site, do this by checking admin in existing site. Notify whatever people who may be online, let them know you are doing upgrade.
2) Rename the old/existing moodle directory to something else, for example "moodle-old".
3) Upload/FTP the ZIP download for the new Moodle version. You will need to unzip this in your public_html root, uzipping it will make a directory named "moodle". You can immediately rename this to whatever you want to call your new install, eg "classroom".
NOTE: You can unzip the file by using SSH/Telnet, go to you public_html directory, make sure you see the moodle.zip file you put there. Type in the command - unzip -R moodle.zip, that is it.
4) Move the config.php directory from moodle-old to the new "moodle".
(Alternative: Open the old config.php file and while viewing its contents, place the same info in the config-dist.php of the new "moodle" install. This will preserve any the new optional settings that might be missing from the old config.php file. Save the config-dist.php as "config.php".
5) IMPORTANT: Move any custom themes or non-standard mods you may have to the new moodle directory into the appropriate directories. Note that most old themes do not work directly in the new version but modifying them to do so is not too hard. If you have installed any optional modules, you might have to copy the <module name>.php file from the lang/en directory into the corresponding location in the new "moodle" directory.
6) Go to you old moodle installation and go to the directory where uploaded tutor and student data resides, usually "uploaddata". Copy this, use FTP if you want. Upload this data to the new installations "uploaddata" directory, this will return yours and your students uploaded data.
7) Access the new moodle and log in as admin. It will automatically do whatever updating is necessary. It can do this because now it "knows" where the original database and moodledata files are located. Bear in mind that the update actually updates many things and goes on until it is done.
8) You can leave the old installation there for the time being as a "backup" or a "confidence booster". After you are very, very sure all works you can go and delete the whole directory.
Again, thank you muchly to all who gave me input, helped me out, caused me to learn a bunch of stuff and saved the day!
Thanks for your upgrading advice re-write. I've added a link to this discussion in docs.moodle.org/en/Upgrading however it would be great if you would consider editing the page and making the instructions clearer.
Can you please post back all the error messages that are displayed on the screen. We'll be able to help you much better then.
Also, are you getting the same errors as in this thread (http://moodle.org/mod/forum/discuss.php?d=60093)?
Thanks for the help.
I would suggest you take the backup you did from before the upgrade, and incrementally upgrade 1.4 1.5 1.6 and then 1.7 try that and see if it works.
For those of you who are moving to a new server, you should probably complete move with the same version you are currently using. This way your MySQL dump imports into moodle without a problem. Then upgrade one increment at a time. Everything went perfectly smooth.
One of the deciding factors for me to upgrade was due to the fact I ubgraded my Linux distribution. I didn't move past 1.4 for a long time because of the new PHP and MySQL versions. So, when I upgrade my OS, this was no longer an issue.
Thank for the help everyone.
P.S. - I guess I'll be paying more attention to the updates from now on.
I'm now having a problem where users cannot log in. I've created a new thread for it so I don't clutter this one. If you can help it would be appreciated.