Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We currently have a dedicated server with one company that utilizes cPanel/WHM and are moving to a new dedicated server also with Cpanel/WHM. I can get it so cpanel is installed then migrates the accounts all over and everything but php has been custom compiled on the original server and I don't know how to duplicate that. Are there any tools that will let you duplicate a server easily? Is there an good way for this to happen?

share|improve this question
up vote 2 down vote accepted

You can locate the custom configuration used to compile PHP via phpinfo().

If you manage the new server, you can compile PHP using the same parameters, or you can pass it along to the hosting company, and they'll be able to tell you if they can support those settings.

share|improve this answer
I did try that. But once I did I was getting apache 500 errors so I figured it must have messed something up. I didn't know if there was a better way to go about it. – mahle May 25 '11 at 21:58
@mahle information from your server logs should help with the 500-series errors - it's usually something subtle, and probably something that was never documented (hint hint, nudge nudge, wink wink, howyadoin?) – voretaq7 May 25 '11 at 22:00

The best way to duplicate a server is NOT to try to duplicate it.

As Matt suggested you want to make sure that things like PHP, Apache, etc. are all built in similar ways to avoid any transition problems, but since you don't know the gory details of the old machine's history and life you should look at this as an opportunity to analyze what you do/don't need on the machine and build your new system against a documented configuration specification.
This will make it much easier when you need to migrate again, or add additional "identical" servers to handle more load.

share|improve this answer

Although I'd agree that you should take this opportunity to evaluate the reasons for the specific PHP compilation, if you really need to clone the server, you could look into imaging software.

You don't mention what OS this server is, or specifics on your host, but Acronis is some great software that I recommend so often I feel like I work for them. That could be useful if the server is Windows, as it will abstract the hardware layer to allow restoration on new hardware.

However, if this is a Linux-based server, you can most likely tar up the whole directory (tar -zcvf /some/path/andfile.tar.gz /), copy it over to the new server running on a live CD, and extract the contents onto the drive.

If these don't seem like viable options, maybe give some more details about your servers. Again, your best bet is to see if you can get things back to a more standard installation.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.