LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-13-2007, 12:14 PM   #1
newbe45
Member
 
Registered: Jul 2003
Distribution: fedora, gentoo
Posts: 128

Rep: Reputation: 15
Clone a LAMP server


I took over control of a LAMP server recently. I don't know much about PHP or Mysql. The machine is getting ready to fail and I need to backup and restore all info onto a new machine. If I install all the services, Is it possible to copy everything over? I think everything should work but I am worried about the Mysql database, again I know nothing about Mysql so what I am wondering is if this is possible at all.
 
Old 09-13-2007, 08:52 PM   #2
choogendyk
Senior Member
 
Registered: Aug 2007
Location: Massachusetts, USA
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,197

Rep: Reputation: 105Reputation: 105
Yes, of course, it's possible. But, it's not easy, unless you are experienced with all the tools and have done it a few times.

Can you shut down the services? That would be the easiest solution. Stick another drive in, clone the partition maps in single user mode, dd the partitions from one to the other. Move it to a different machine. Reconfigure reboot.

If you can't do that, then life gets more interesting. You're still going to need some downtime or transition time. You could install everything for a new machine, transfer the data over, then redirect the service definitions (DNS) to point to the new machine. Getting the data over requires dumping MySQL, transferring, importing. But then when you make the transition, you will still have transactions that you will have to transfer over to bring the new one up to date with anything that happened on the old one before you shut it down. Unless you have the freedom to simply shut it down, transfer the data, and then bring it back up.

For starters, you can look at this: http://www.mysql.org/doc/refman/5.1/...mysqldump.html. But you are probably going to have to do a fair bit more reading to get comfortable with the task at hand.

As you zero in on what you really need, ask more questioins.
 
Old 09-13-2007, 10:29 PM   #3
newbe45
Member
 
Registered: Jul 2003
Distribution: fedora, gentoo
Posts: 128

Original Poster
Rep: Reputation: 15
Seems like I am getting into a bigger headache then I thought. Like I said I know nothing at all about MySQl and thats really the only thing I am not sure about transferring over. I do have the ability to shut it down for awhile. I guess I am going to have to do a lot of reading which I really don't have time for. I might even create a similar server to test on. Maybe I could even create a mirror image of the drive with some third party app. What exactly did you mean by dd?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting up Ubuntu LAMP Server for local web server sewmyheadon Linux - Newbie 5 02-11-2007 03:06 PM
LAMP Server? carlosinfl Linux - General 5 10-05-2006 01:05 AM
How can I setup a server (LAMP)? Aziz Linux - Server 1 09-06-2006 07:55 PM
New LAMP Server dragondefj Linux - General 5 01-31-2006 02:38 AM
Lamp Server kwickcut Mandriva 1 11-25-2005 11:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration