0

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:

  1. 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?
  2. 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.

Kyle
  • 215
  • 2
  • 10

1 Answers1

0

Answer to part #3:

Xen does seem to have "device drivers for Windows", so...

Q) Is your home system linux or windows?

If Linux to Linux, then:

Should I use rsync instead?

Yes, I would choose rsync over "tar -c|ssh home" / Much faster and less server load.

Answer to part #2:

Rsync works great with PuTTY, so 'Yes' it is possible over the Net.

Part #1:

...without interrupting a live server?

rsync will add some server load, taring a whole system will probably add much more load.

This_Is_Fun
  • 124
  • 1
  • 2
  • 11
  • Yes, it is Linux to Linux. And it's got load to spare - the load is normally 0.01, and it's got 8 cores to play around with, so it looks like rsync could very well be the best choice. Thanks! – Kyle Jan 29 '11 at 08:28
  • Sure, have fun. :) – This_Is_Fun Jan 29 '11 at 08:45
  • Clearly I shouldn't have edited the post. No one else seems to have clicked it. :P So marking this as the answer. – Kyle Feb 01 '11 at 02:47