Migrating a webserver

Status
Not open for further replies.

mBernhardt

In Runtime
Messages
279
Location
Ohio
I have a little home web server I run for a PBEM game of mine. Its all been setup rather slapdash as I've figured all the nooks and cranies.

Basically, its running Mandriva, Apache, PHP4 and MySQL. (don't remember which version off the top of my head, i believe its 1 behind though, much like my PHP)


I would like to migrate everything (databases, web directories, etc) to a new server for several reasons. (Faster PC, etc)


I would also like to change over to running Ubuntu since there are features I prefer in Ubuntu over Mandriva.


So, my real question is what plan of attack would people here suggest?


My thoughts were either 1) to set up each of my web-apps individually then migrate the databases through each program. (They have options to backup/restore information in most of them)

Or, 2) I could backup all of my database from MySQL and move them over to the new server and do a mass copy of my web root directory and hope that everything will know where its pointing to.


Has anyone dealt with something like this with any luck? I would like to make this as transparent a change as possible.
 
Probably the easist way would be to get the new system up and running "clean," then set up all of the applications required, Apache, MySQL, etc. Then copy over the Application (source code + config). Once you've done that, export the database on the old machine, and import it into the MySQL instance on the new machine.
 
Ok, after a night of working on this. (around other things)

Migrating the actual data was no problem. (duh)

The database is proving to be a little more difficult. The tables and structure are moving over just fine. I'm still working on what exactly is keeping the data from transferring over.

I'm using phpMyAdmin on both servers. Difficulty is that it only allows you to import 2MB worth of data through the web. I've tried using Ubuntu MySQL Administrator to get around that to no luck. I think my next play of attack is to break up the backup into smalled chunks (maybe only a few tables at a time) to try to do it that way.

Always open for suggestions.
 
Why don't you just export the entire DB, scp the dmp files over to the new system, and do a fresh import? You'll have to use the command line and/or MySQL SQL Interpreter interface or write a script, but it's a lot easier to export/import than what you are trying to accomplish.
 
That is what I actually did. Very easy.

Exported through phpMyAdmin from the new server. Then, dropped to command line. mysql mysql -u*** -p

Entered password, then "source mysql.sql" and it worked.

New server was up and running in minutes right where the old one left off. Good to know for future reference.
 
at command line type mysql dbname
then at next prompt which looks like mysql> type /. pathtosqlfile - i think its a / not a \

thats the import command for sql
tis easy
 
now i know why they forced us to learn SQL at university.....i hated it!

i still do lol
 
Status
Not open for further replies.
Back
Top Bottom