Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I would like to run a copy of my live webserver in a Virtual PC on Windows so whenever I need to install new stuff on my webserver, I can "practice" first on the virtual copy.
It doesn't need to be an exact copy: I'm not really interested in having a copy of all domains on the webserver.
Is there a way to do that without having to take the webserver offline?
Do you keep your web servers under version control? How about your apache configuration files? If so, you can just check out the files into the virtual, and maintain good copies back and forth.
A p2v may help but not really needed. A dd of the drive ought to create a raw file, then use qemu-img to convert to a vpc hard drive format.
Almost any clone type of deal should work also. You can clone it to a file or set of files then make a new vm. Then boot to some live media to return the files to the new blank drive.
Use any tool for an real machine. A vm is no different.
If it is already a virtual machine then just copy it to some place and run it from there but be sure to disable network before you boot it.
Ok, I actually started to create a ghost using dd until I realized this isn't going to work. My webserver is actually in a data-center - a two hour drive from where I live. The disk I want to ghost is 160Gb in size, meaning the image will be 160Gb as well. I realize I can compress this with gzip/bzip but that will still leave me with a file at least 70GB in size (that's the total size of files I know it can't compress any further (zip files, jpgs, etc).
I have a very fast internet connection at home so I should be able to download that in about 2 hours. Only problem is, that will eat up precious datatraffic from my server (I have a 500Gb monthly limit).
There's a lot on that drive I'm simply not interested in. Entire folders containing huge zip files or thousands of images. If I somehow can exclude those, I'm sure that what's left will not be larger than a few GB.
I have a similar setup and I installed apache, php, mysql, etc. on my "play" server. Got it all configured.
Now I have a nightly rsync job that runs and syncs /var/www/html from my production server to my "play" server. You can easily exclude portions of the website (videos, documents, etc.) with rsync so that you're not moving too much data.
Now I have a nightly rsync job that runs and syncs /var/www/html from my production server to my "play" server.
I had already tried rsync but for some reason it did not work. After the rsync, the installation on the virtual machine gave some weird error and started a BusyBox shell instead.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.