Installation help

Moodle migration issue

 
 
Picture of András Égler
Moodle migration issue
 

Hi,

I'm trying to migrate my Moodle system (v2.5.2) to another server, but I have a strange issue... First I moved all of my files and made a database dump. Then I paste my files into the new server, created the new database and inserted all data. Finally I modified config.php (set the new db, wwwroot etc.). Then I tried to reach my old system in my new server, but I got a "No such file or directory" error message...

OK, then I installed a totally fresh Moodle (of course v2.5.2) to the new server and then in my old system (in the new server) I modified the config.php file to swich to the fresh moodle database. Aaaaaand: my old system in the new server is working!!! So I guess something is wrong in my old database (of course after exporting my old database I changed all "oldserver.com" link to "newserver.com").

Please help me! What should I do? I need my old database in my new server!

Thanks in advance!

 
Average of ratings: -
Picture of Emma Richardson
Re: Moodle migration issue
Group Particularly helpful Moodlers

So let me get this right - you now have two versions of Moodle on the new server, one pointing to a new database (so basically a totally fresh install) and one that was copied over from the old server pointing to your imported database?

You have not mentioned your Moodledata folder - did you get that brought over and is it in the same place as the old one?  Did you check permissions and ownership on Moodledata folder and imported Moodle folder?

Have you set up the Apache config file to point to the correct folders?  Did you import the entire database or copy data to a new database - in which case are the permissions correct on the new database?  

Those are the first things I can think of...

 
Average of ratings:Useful (1)
Picture of András Égler
Tárgy: Re: Moodle migration issue
 

Hi Emma,

Thanks for your answer. Yes, I've also checked the Moodledata directory, migrated all files onto my new server and rewrite the config.php as well to point to the correct directory.

I imported the whole database, all tables and all data into the new database and the permissions are correct.

But: what do you mean in "set up the Apache config file"? Where can I find it and what should I modify in it?

Thanks!

Andrew

 
Average of ratings: -
Picture of Emma Richardson
Re: Tárgy: Re: Moodle migration issue
Group Particularly helpful Moodlers

You need to check that your sites_enabled is pointing to the right place (on linux - /etc/apache2/sites-enabled/default.conf).  But if your second attempt worked, then I imagine it is.  

When you go to the site, what address is showing your address bar?  Do you get to any Moodle page at all - does it look like a Moodle error page?  It sounds like it might be so...

I would try the following.  Turn on full debugging, you can do this in your config.php - google for instructions on how to do that.  Hopefully that will tell you what is going on.  I have had errors where a table got corrupted in the import but a quick repair on it got the site back.  Hopefully debugging will point you to the problem - if there is a permissions error somewhere, it might show you where.

Triple check your config.php - I have had issues with a stray / or errant character in my config.php which was enough to shut down the whole site.  

If that doesn't work, I would try redumping and reimporting the database.

 
Average of ratings:Useful (1)
Picture of András Égler
Tárgy: Re: Tárgy: Re: Moodle migration issue
 

Well, when I try to open my frontpage I get the "No such file or directory" error message. I've been working with Moodle for 2 or 3 years, but I haven't got a message like this yet. And it doesn't look like a Moodle error message... In Firebug I only see this source code: <html><head></head><body>No such file or directory</body></html> so I guess it is not a Moodle message.

OK, I tried to set up debug mode in config.php, but unfortunately I didn't get any information about the error... sad

I also created another dump from my old database and imported again but the result is the same.

I think there is something in my old database (as I mentioned: if I switch to a freshly installed database, everything works fine - but I miss all of my old data) what causes the problem.

My last idea is: import my old database table by table and check which one is the wrong table.

 
Average of ratings: -
Picture of András Égler
Tárgy: Re: Tárgy: Re: Moodle migration issue
 

Wow, fortunately the 30th table (mdl_block_instances) solved the problem!!! smile I deleted all records from this table and now everything seems to be OK!

Huhh I can not believe it!! smile

Thanks for your help again!

 
Average of ratings: -
Gmads
Re: Tárgy: Re: Tárgy: Re: Moodle migration issue
 

Hi András,

As always, then you should rate Emma's post as useful smile

"Rate forum posts as useful to help others that may encounter the same problem


 
Average of ratings: -
Picture of Emma Richardson
Re: Tárgy: Re: Tárgy: Re: Moodle migration issue
Group Particularly helpful Moodlers

big grin

 
Average of ratings: -
Gmads
Re: Tárgy: Re: Tárgy: Re: Moodle migration issue
 

Yes smile

 
Average of ratings: -
Picture of Emma Richardson
Re: Tárgy: Re: Tárgy: Re: Moodle migration issue
Group Particularly helpful Moodlers

Glad you were able to figure it out!

 
Average of ratings: -