Replicate a live production server?

So I run a “small” SaaS site that runs on a single linux server. I want to basically replicate the entire server, so that if the main server ever has a hardware problem, etc. it will automatically failover to the backup server and no one will even notice. I have no idea where to even begin - can someone point me in the right direction? It’s just a basic LAMP server.

Would I setup a cluster and use heartbeat? Would I use something like Double-Take Availability to handle the replication? Obviously I need to setup another server, I’m just not sure what to do next…

The term you’re probably looking for is Load Balancing.

There are loads of tutorials on it and even pretty good Apache Documentation. You could even try out some PaaS services that will take out a lot of the configuration and just make it easy. Amazon EC2 is also an option.

Thanks for the reply. So if I understand correctly, basically I need to setup another server, setup something for replication so the 2 servers are always identical, and then use something like HAproxy for the load balancing/failover?

Yes, are you using source control? You could just update your source with Git on each server.

Of course, you still need a single MySQL Database. Database clusters are an entirely different (and considerably more complicated) subject.

No source control. :frowning:

Here’s what I’ve come up with so far. It seems like I just need to setup a 2nd server, use something like DRDB to replicate everything except for the live MySQL db, setup MySQL replication separately, and then use something like HAproxy for load balancing/failover. Does that sound about right?

Any chance you can recommend a person or company that offers consulting/services to help me achieve all of this? Thanks!