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.

Does anyone have a good complete strategy for backing up a bunch of virtual machines running under VirtualBox?

I intend to run a handful of virtual machines on a single hardware platform and back them up nightly to external disks, which will be taken off site every weekend in rotation.

(Just to clarify, I don't intend to shut the machines down during this process, if I can avoid it)

Am I right in thinking I can just write a script which, each night, creates a snapshot, copies the 'main' disk image to the external media, then removes the snapshot again?

Better ideas are much appreciated!

share|improve this question

3 Answers 3

up vote 5 down vote accepted

In the VirtualBox 2.2+, there is a feature that allows you to import/export VM's in the Open Virtualization format. This format puts everything together for you in one nice file.

  • To import

    • From the GUI: File -> Import Appliance
    • From the console:

      VBoxManage import SomeName.ovf

  • To export

    • From the GUI: File -> Export Appliance
    • From the console:

      VBoxManage export "Name of VM" -o SomeName.ovf

share|improve this answer
    
i dont know how import/export works, but i have some problems to run same VM on Windows to MAC, but I got it to work after changing something in XML file –  alexus Jul 31 '09 at 16:34
    
Looks exceptionally handy, especially if it's scriptable -- but does it work without shutting the machine down? –  James Green Aug 1 '09 at 10:52

if you going shut your VMs down, just copy everything without snapshots, also keep in mind that you need to copy .xml files as well

share|improve this answer
    
I wasn't planning to shut down the machines to back them up, as they will be running customer visible services, however I can probably arrange a brief window to do this if it's the better way... –  James Green Jul 31 '09 at 17:04

maybe halting the VM is good enough to back the files up?!

share|improve this answer

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.