Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

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.

share|improve this answer
    
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! –  kyl191 Jan 29 '11 at 8:28
    
Sure, have fun. :) –  This_Is_Fun Jan 29 '11 at 8:45
    
Clearly I shouldn't have edited the post. No one else seems to have clicked it. :P So marking this as the answer. –  kyl191 Feb 1 '11 at 2:47

Your Answer

 
discard

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.