How to make an image of CentOS 5.5 running on a Physical Server.I idea is we dont have any redundant environment, in a situation if the Physical server crashes.Therefore planning to an exact replica of the current server and the initial thoughts are:

I know you probably don't want to hear this again but 5.5 is dangerous and should not be used. As I said before, your best solution would be to install a copy of 5.11 for your test/backup machine and then test that your applications work properly and then yum update your existing system to 5.11 too. Even this is not a solution long or even medium term: CentOS 5 is rapidly approaching End of Life and there will be no more security updates for it. Ideally, you should probably install CentOS 6 or even 7 as your test/backup system and migrate your workload over to that. In March 2017 there will be no more support for CentOS 5 at all.

If your existing 5.5 system is exposed to the internet at all then it is extremely dangerous to run it. If you have users using it that are not 100% trusted then the same applies. Your 5.5 system was released in May 2010 and thus has had no updates applied to it since then (or it would already be 5.6/5.7 etc). The full list of fixes that have been released for CentOS 5 can be viewed http://rhn.redhat.com/errata/rhel-server-errata.html and anything that says it was released after May 2010 is missing from your machine and you will be exposed to the bug. I selected only security updates from that list and I see 23 pages of bugs since May 2010 - that's around 550 security bugs that you do not have fixes for at the moment.

CentOS 5 died in March 2017 - migrate NOW!Full time Geek, part time moderator. Use the FAQ Luke

Thanks for sensitizing on the issues with CentOs 5.5Well, I dont want to go with version 5 but as first the appraoch will be to have another machine and that too in virtual form.(current production running on Physical with CentOS 5.5)

Later to upgrade the Version 5.11 machine to latest supprted version.

Coming to the question of any option to make an image of Centos 5.5 running on Physical Server, do you see any option apart from -

a) Installing CentOS 5.11 on another machineb) installing the required application and database

I`m not so this, reason we are not sure what all drivers / plugins will be required and thus looking at getting an image so we have all covered from the base physical production server,

well you'd have to create an image on disk with dd if=/dev/zero of=/just/afile.img, then mkfs.whatev /just/afile.img mount it and rsync pretty much everything on there from / (exclude dev run proc mnt sys) and... unmount, then maybe squash the image

or did you literally mean dd if=/dev/yourdisk of=/anywhere/yourimage.img this will create a full image of your disk (but it'll make it the actual size of all your partitions summed up) then either squash it or xz it