I've been asked to do some server tuning on a production openVZ VPS to try and get the apache memory usage down. (Apache's been hitting the memory limits and we've been getting fork(): Can't allocate memory
a number of times a day.)
However, I can't interrupt the live site, and I've already done everything that can easily be reversed - shutting down unneeded services, removing unused apache modules, and changing the prefork MPM variables.
Now I'm looking at creating a duplicate of the server on my home dom0 for dev/testing purposes, but going from OpenVZ to Xen doesn't seem to be too simple. I think I can rsync the entire filesystem over to a logical volume in my dom0, and create a domU config file and it should boot.
Unfortunately, my Google-fu is weak, and what stuff I've found is useless, or about Xen to OpenVZ, which is the exact reverse of what I want.
tl;dr:
- Is/Are there any guides on how to clone an OpenVZ instance? I know it's not a self-contained system, so I have to find the kernel and ramdisk, but other than that?
- Are there any 'gotchas' that I should look out for when cloning a system?
Thanks.
Clarification: The OpenVZ system is running CentOS 5.2. Also, for something that I threw out randomly, it does look like rsync is better than tar. So question updated.