Skip to main content
Topic: Migration to new server fails (Read 3988 times) previous topic - next topic
0 Members and 3 Guests are viewing this topic.

Migration to new server fails

Hey there, my name Allan and currently I have to move an ElkArte 1.1.5 installation to a new server location. Things had to be rushed a bit due to the client request.

So I am a little bit stuck now and I am facing some issues. Within Softacolous I was able to import the backed up installation once from the source server to a test account on the new server.

After that I thought yeah cool thats easy and set everything up but the import fails anytime now. Ok maybe an issue with the cpanel and softaculous.
So I thought : "hey lets do some sql magic" and backed all files up manually and did an export of the db, changed all variables to match with the new db and dbuser etc. But after the sql import the installation is broken.

Also tried to use a sql export from the admin backend which came from the working installation. But also, the import is going through but the installation is broken after the import.

Today I spent around 5 hours with research and fixing this without success.  I also was looking around for a import / export tool but without success too. So maybe I overlooked somehting. So here is my question:

how exactly can i migrate an installation to a new servrer location? There is the export function but why is there any imoport feature?

Hope someone can help out.

Best regards
Allan

Re: Migration to new server fails

Reply #1

Hi @pewpew and welcome.

I'd be interested in hear "how" the installation is broken when you import the exported db.

In general the migration is:
  • do back of files and sql,
  • upload files to new server
  • import sql to new db
  • fix the settings (db password and username, paths, URLs (that should not apply to this case))
  • you are done
Bugs creator.
Features destroyer.
Template killer.

 

Re: Migration to new server fails

Reply #2

Hey emanuele,
thanks a lot for your message. I will give it another try tomorrow as I can´t think straight anymore for today.

After the import, the browser shows a 500 error. The connection to the db is ok. So I guess that I will have to check some paths within the db.
I adjusted the config.php file to match with the new server and db location.
Will get back on it tomorrow.

Thanks
Allan

Re: Migration to new server fails

Reply #3

Quote from: emanuele – fix the settings (db password and username, paths, URLs (that should not apply to this case))
 
 
I would add  run repair_settings.php

and
 
 
sorry for my bad english

Re: Migration to new server fails

Reply #4

Quote from: pewpew – After the import, the browser shows a 500 error. The connection to the db is ok. So I guess that I will have to check some paths within the db.
500 sounds like file permission issue, either too strict or too permissive.
Paths settings are very unlikely to give 500 errors (for the important ones there is a safety check to ensure nothing is too broken, while the others are relevant only in certain pages).
Also... config.php? Elk uses Settings.php.
Bugs creator.
Features destroyer.
Template killer.

Re: Migration to new server fails

Reply #5

Quote from: emanuele – Hi @pewpew and welcome.

I'd be interested in hear "how" the installation is broken when you import the exported db.

In general the migration is:
  • do back of files and sql,
  • upload files to new server
  • import sql to new db
  • fix the settings (db password and username, paths, URLs (that should not apply to this case))
  • you are done
I'm by no means an expert here, but I recently copied an install from one directory to another on my server and there's one more step I had to do.  I'm assuming the OP has access to phpMyAdmin...

  • navigate to the db in phpMyAdmin
  • "search" for old domainname, don't forget to select all db-tables
  • update the values (paths) to the new domain

Re: Migration to new server fails

Reply #6

Thanks a lot to all of you helping out!

Will have a look at the repair_settings.php file and try to fix everything with it.

For other users who run into the same issues, the file is located here: https://tools.elkarte.net/2014/12/repair_settings

Will get back later to report the outcome.

Re: Migration to new server fails

Reply #7

If I'm not wrong that repair_settings.php is for Elkarte 1.0.x, somewhere on the forum should be the version for 1.1.x... 
sorry for my bad english

Re: Migration to new server fails

Reply #8

So all went good using the repair_settings.php file. Will check again the forum for issues but now there are no complaints so far.
I was not able to find another version for 1.1.x

:)

Re: Migration to new server fails

Reply #9

my mistake, sorry. I have read "Last Update: Dec 10, 2014" and I thought that is the last time it was updated, but checking on github I see it was updated on 2017.
@Spuds‍ if it'a a good idea, the last update date displayed here https://tools.elkarte.net/2014/12/repair_settings could be synced or changed with the last commit date?
sorry for my bad english