Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I run Ubuntu Server 11.10 i386 with Virtualbox.

I want to create and move a complete backup to a dedicated computer. If possible downtime has to be cut to a minimum because the site is running right now. I cant move only the webpage because I have a lot of settings, databases and daemon that took a long time to setup.

What are my option to easily move my virtual server to another computer that will not run Virtualbox?

I have SSH and physical access to both server.

share|improve this question
up vote 1 down vote accepted

I'd do it this way (don't just follow it without adjusting it to your actual situation):

  1. Boot an Ubuntu Live CD on the new computer
  2. Format the hard disk as desired, mount partitions in a temporary location (say /mnt/disk1).
  3. From the virtualbox server, rsync stuff to the new one:

    rsync -avuz --progress --exclude=/proc/* --exclude=/sys/* --exclude=/run / new-server:/mnt/disk1

  4. Install grub on the new server:

    sudo grub-install /dev/sda

  5. Modify /etc/fstab to point to the right partitions/locations (if your root "/" is pointing to a UUID, you can point it to the new UUID for your new root partition or point it to /dev/sda1 or whatever you're using).

  6. At this point the new server should be able to boot and pretty much have the same configuration as the virtualbox. You can try unplugging it from the network and booting to ensure things are working.
  7. Once you know it's booting, boot the new server with the LiveCD again, and mount partitions to temporary location again.
  8. DOWNTIME HERE. Stop the services in your virtualbox (sorry, can't get around this, but I'll keep it as brief as possible). LEAVE SSH RUNNING.
  9. Rsync to get any files that changed since the last sync, this should take a couple of minutes at most:

    rsync -avuz --progress --exclude=/proc/* --exclude=/sys/* --exclude=/run --exclude=/etc/fstab / new-server:/mnt/disk1

  10. Reboot your server

  11. Don't forget to bring down the virtualbox at this point or problems will ensue :)
share|improve this answer

Your Answer


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.