LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Clone a LAMP server (https://www.linuxquestions.org/questions/linux-server-73/clone-a-lamp-server-584434/)

newbe45 09-13-2007 11:14 AM

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.

choogendyk 09-13-2007 07:52 PM

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.

newbe45 09-13-2007 09:29 PM

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?


All times are GMT -5. The time now is 04:41 PM.