Salvage old moodle install

Salvage old moodle install

by Luke Evans -
Number of replies: 11

Hi,


We've moved to a new domain this summer and I need moodle running on our new servers with the existing data. I'm not a database admin, so I desperately need help setting up a moodle installation and importing our existing data. Could anyone help? I've made multiple attempts to go through the wiki's and tutorials but I'm not confident enough with SQL command line. Something in plain english pointing out each step I need to take would be like gold dust.


Thanks

Average of ratings: -
In reply to Luke Evans

Re: Salvage old moodle install

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Are you upgrading or just moving it?  What version?  Do you have a database management program installed - something like phpmyadmin?

In reply to Emma Richardson

Re: Salvage old moodle install

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

To add to Emma's questions, do you know how to SSH into your server?

In reply to Rick Jerz

Re: Salvage old moodle install

by Robert Brenstein -
And not to forget that Moodle does not keep all in the database but there is also a folder with files that need to come over. There are different approaches to that but as said above we need to know more.
In reply to Robert Brenstein

Re: Salvage old moodle install

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Robert, you made me think a little more.

We need to know the old version number of Moodle and what you plan to move to?

We need to know what your server is (i.e., Linux, Ubuntu, etc.)?

We need to know what your current database is (mySQL?) and what you are moving to?

If you are the one doing the move (or somewhat else) what toolset do you know?  SSH, FTP, a control panel?

In reply to Rick Jerz

Re: Salvage old moodle install

by Luke Evans -

Old version is 2.5.6, happy to stick with that version if it makes the process any easier. The server is Windows Server 2012 R2. Current database, well all I can see on the old server is a few ".SQL" files, so presumably MySQL? Files names IBDATA and allgb_backup (little to no relevance, other than I'm not sure which .SQL file I need to worry about).

I'm the one doing this and I've never set up moodle before.


Thanks

In reply to Luke Evans

Re: Salvage old moodle install

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

It appears that you want to move your old moodle from a Windows Server to maybe a Linux server.  I do not have any experience with Windows Servers, and don't know if they run mySQL.  Maybe others here do and can help you.

In general, my own method is to:

1) Upgrade your OLD moodle to the same version of moodle that you want to run on the NEW system.

2) Backup your OLD database and moodledata folders.

3) Install your NEW moodle, including the same plugins from your OLD.

4) Replace the NEW moodle database tables with your OLD database backup.

5) Replace your NEW moodledata contents with your OLD moodledata contents.

I am not sure if this will work for you, but I provide this as a framework.

In reply to Luke Evans

Re: Salvage old moodle install

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

It appears that you want to move your old moodle from a Windows Server to maybe a Linux server.  I do not have any experience with Windows Servers, and don't know if they run mySQL.  Maybe others here do and can help you.

In general, my own method is to:

1) Upgrade your OLD moodle to the same version of moodle that you want to run on the NEW system.

2) Backup your OLD database and moodledata folders.

3) Install your NEW moodle, including the same plugins from your OLD.

4) Replace the NEW moodle database tables with your OLD database backup.

5) Replace your NEW moodledata contents with your OLD moodledata contents.

I am not sure if this will work for you, but I provide this as a framework.

In reply to Robert Brenstein

Re: Salvage old moodle install

by Luke Evans -

Yes I see the Moodle and Moodledata folders.

In reply to Emma Richardson

Re: Salvage old moodle install

by Luke Evans -

Hi,


Just a server move would suffice. Version 2.5.6. I don't see phpMyAdmin on the server. Just MySQL Command Line Client.

In reply to Luke Evans

Re: Salvage old moodle install

by Usman Asar -
Picture of Plugin developers Picture of Testers

Sorry, I may be a bit too late, just the word "Windows Server" caught my attention.

Luke, unless you are already half way through, you have to setup PHPMyAdmin on your system, it's not hard, very easy process, you can as well use HeidiSQL if you need to (both are database management applications) and both works equally well with MySQL and MariaDB.

What version of moodle  are you on? if you want to, I can have a look at your Moodle remotely to assist you in transferring over the moodle.

In reply to Luke Evans

Re: Salvage old moodle install

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

So, the first thing you need to know is the name of your database.  On your Windows server, go to your moodle folder and open up config.php.  Look for CFG->dbname= and whatever name follows is your database name.  It should also tell you the type of database you are running. 

For now, we will presume it is MySQL.

From your mysql command prompt you should be able to type in: mysqldump -u username -p dbname > filename.sql (fill in the appropriate parts with your info - you will need to know the database user and password).

Take the file that is created and move it over to the new server with the moodle and moodledata folders.  Then use mysql commands on the new server to restore the database.  Not sure on your server but commands should be very similar either way.  You can easily google the command to restore.