Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 08-01-2006, 02:10 PM   #1 (permalink)
mBernhardt's Avatar
 
Super Techie

Join Date: Jul 2006

Location: Ohio

Posts: 279

mBernhardt

Default Migrating a webserver

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.
__________________
"i would never use a firewall, even without a router protecting me. Firewalls are just wastes of memory."
name omitted to protect the innocent

the cake is a lie
mBernhardt is offline  
Old 08-01-2006, 02:30 PM   #2 (permalink)
 
Junior Techie

Join Date: Jul 2006

Posts: 55

jmhill1976

Default

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.
__________________
\"A revolution without dancing is a revolution not worth having.\" V, V for Vendetta
jmhill1976 is offline  
Old 08-02-2006, 08:17 AM   #3 (permalink)
mBernhardt's Avatar
 
Super Techie

Join Date: Jul 2006

Location: Ohio

Posts: 279

mBernhardt

Default

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.
__________________
"i would never use a firewall, even without a router protecting me. Firewalls are just wastes of memory."
name omitted to protect the innocent

the cake is a lie
mBernhardt is offline  
Old 08-02-2006, 03:08 PM   #4 (permalink)
 
Junior Techie

Join Date: Jul 2006

Posts: 55

jmhill1976

Default

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.
__________________
\"A revolution without dancing is a revolution not worth having.\" V, V for Vendetta
jmhill1976 is offline  
Old 08-02-2006, 05:38 PM   #5 (permalink)
mBernhardt's Avatar
 
Super Techie

Join Date: Jul 2006

Location: Ohio

Posts: 279

mBernhardt

Default

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.
__________________
"i would never use a firewall, even without a router protecting me. Firewalls are just wastes of memory."
name omitted to protect the innocent

the cake is a lie
mBernhardt is offline  
Old 08-02-2006, 05:48 PM   #6 (permalink)
 
True Techie

Join Date: Dec 2004

Posts: 164

Skuzzle

Default

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
__________________
Skuzzle - Powered by Badgerbyte Web & IT Services
www.drive4fun.co.uk check it out
Skuzzle is offline  
Old 08-10-2006, 05:27 PM   #7 (permalink)
 
Newb Techie

Join Date: Jul 2006

Posts: 11

DaveDXB

Default

now i know why they forced us to learn SQL at university.....i hated it!

i still do lol
DaveDXB is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On