Let's say I have two web servers (in a datacenter), A and B. I don't have physical access to any of the servers, only root ssh access.
A is an old server with old hardware, but it's configured the way I want it (security, settings, etc..), while B is a new server with newer hardware (totally different from A), and it has a fresh install of CentOS (for example).
What's the best way to clone server A to server B, so all my files,settings,applications are moved from A to B?
Best Answer
If the newer server runs the same OS version, you could run a simple script from the newer server that copies most of the files:
I used this script in the past to duplicate Debian servers, and it worked fine but some manual (re)configuration, like
apt-get install -f
was sometimes required. Therefore, use with caution, perferrably in a test environment first.