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

I have a VPS running Debian with Plesk which I use to host some of mine and client's websites.

I'd like to know what's the best way to create a backup of the server so if anything happens to the main server (VPS), i could just point the DNS nameservers to the duplicate one and keep it running until the other is fixed.

Basically I'd like to create a virtual machine (using virtualbox) that would be very similiar to my original server.

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

The following steps worked for me on a debian-ubuntu system.

 * Create a virtualbox guest , with appropriate disk and memory calculation on the target. 

 * Install the debian OS.  Just the OS only with ssh and network configured.

 * Keep one or two terminals open on your new virtual box.

 * Sync all the files from your source to new virtual guest , like shown from the original server

           rsync -vaP --archive --delete --numeric-ids --one-file-system --exclude=/proc --exclude=/sys / Virtual_Guest:/

  * Post changes before you reboot. 
        a> Change your networking information back to virtualbox settings. 
        b> Change your fstab entries. 
        c> run  "update-grub" , depends on what debian flavor 
        d> Remove the appropriate udev rules.  
             Eg:- /etc/udev/rules.d/70-persistent-net.rules 
        e> check your /etc/hosts. 
        f> Check anywhere you hardcoded the original name and ip. 

  * Reboot the box. You should have the clone of the original server. Again make sure to check your application configurations to point to the new name and ip of the virtual box. 
share|improve this answer
add comment

As your hardware might be different a lots of issues can occur when using an imaging solution like you've planned. This is why I would recommend imaging solutions only to back and restore to exactly the same system.

It would be easier to backup the data you actually need (which would be the databases, website and mail data), maybe even with the plesk integrated backup feature. You then can pre-configure another machine with the same plesk version, and if something goes wrong you simply have to restore the plesk backups and change the DNS records.

share|improve this answer
add comment

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.