Page 1 of 1

How to properly back up Virtual Box environment

Posted: 30. Aug 2010, 15:00
by onixterry
We have our Virtual Box installed on Ubuntu. The only application that will run on the box is Virtual Box so it is the only data that needs to be backed up. We will have a USB drive attached to the box for keeping the copies of the data.

We want to be able to have a complete back up of all of our VMs so that we could recover if there was a hardware failure and we had to rebuild the OS.

Do we simply need to keep a copy of the .VirtualBox directory and all files/folders within it or is there more to it than that? Also, can we simply restore those files to the .VirtualBox directory of a brand new Ubuntu and have it work correctly?

If there is a better way to maintain back ups, please let me know.

Thanks
Terry

Re: How to properly back up Virtual Box environment

Posted: 30. Aug 2010, 18:22
by mpack
onixterry wrote:Do we simply need to keep a copy of the .VirtualBox directory and all files/folders within it
Assuming that you haven't used any of the features which allow you to store files outside that folder tree, then yes, backing up that folder tree is all you need to do.
onixterry wrote:Also, can we simply restore those files to the .VirtualBox directory of a brand new Ubuntu and have it work correctly?
Yes, that will work.

You are describing a complete backup and a complete restore, which is quite easy. The tricky bit comes if you only want a partial restore, eg. restoring just one damaged VM (without affecting other VMs), the damaged VM used snapshots, and the snapshot chain has changed since the last backup. If snapshots are not used then this case is pretty easy too.