Help needed moving database to new server from 1.5.2 to 1.7

Help needed moving database to new server from 1.5.2 to 1.7

by Karen Nicholas -
Number of replies: 3

I'm changing hosts and have moodle 1.5.2 running on the current server with about 60 students and 60 courses that I want to copy to the new server. I have installed moodle 1.7 via fantastico in cpanel on the new server and it has created a new database.  I'm going round in circles trying to figure out what I need to do to move/upgrade the old database and copy it to the new. I think I am right to copy the course files across via ftp, but the database side of it I'm not confident with.

I've tried upgrading the current server install via the fantastico upgrade link, with the intention of just downloading the upgraded database and uploading it to the new. But it tells me there is not enough room on the server to do this.

Hoping someone can help with some quick instructions for me.  Thanks

Average of ratings: -
In reply to Karen Nicholas

Re: Help needed moving database to new server from 1.5.2 to 1.7

by Jai Gupta -
for migration you have to transfer files and database.

as you allready know about files so i will try to explain about database.

you can export database to your pc by using myadmin of mysql.

now you will have an sql file. upload this file to your server and use the following command in shell

mysql -h localhost -u databaseuser -p databasename < sqlfile

in case you dont have shell access then you may try to import the compressed (gz) file in myadmin of your new servers mysql.

if it fails then it may be because your database is too big for your server, it may have timeout (php script time out) or may be because of less ram for this operation.

in this case you may try to delete your log from your backup file (which takes huge space) now you may try to import, even if it fails then you must be having large database and you need to import by creating many parts of your database and then importing one by one.
In reply to Jai Gupta

Re: Help needed moving database to new server from 1.5.2 to 1.7

by Karen Nicholas -

Thanks Jai. If I read your instructions correctly, replacing the new database with the old should work - but I thought there was an upgrade on the database required between these versions? Backing up and restoring to moodle 1.7 gives me a utf warning and doesn't pull in the correct structure.  Would you mind confirming if I have interpreted your instructions correctly?  Thankyou!

In reply to Karen Nicholas

Re: Help needed moving database to new server from 1.5.2 to 1.7

by Jai Gupta -
before replacing database make sure you dump (empty) the new database first... yea, it needs an upgrade after that... just go to your admin section by

www.yourwebsite.com/moodle/admin

now the moodle will upgrade... you may also have to convert your database to utf after that by using moodle's utility (you will have an url to click in your admin section)

i would recommend you to give this work to experts if it is a production server...