Live backup of VMs using snapshots?
Posted: 27. May 2009, 18:16
I am putting together a VirtualBox host to host a number of VMs (http, mail, mysql, ftp). As a part of this process I want to make backup images on a nightly basis that can be used to quickly restore these machines should the host fail (this is in addition to other redundancy measures).
My thought has been to take a snapshot right before the backup is run, allowing the main VDI to be backed up without it being modified. From what I've read on the VirtualBox forums, it appears that the way to restore a VM on another host machine is to just create a new VM that uses the VDI from the backup. Indeed, I have found that trying to register an existing VM xml file from another host seems to cause trouble. Is this the best way to restore a VM on another machine (copy VDI and create a new VM), or is there a better way that I am missing? I have read a bit about the export/import functionality included in 2.2.0; is this functionality suitable for regular backups in a production environment?
Another thought I have been throwing around is using LVM snapshots for making backups as opposed to VirtualBox snapshots. They both seem to be a means to the same end, but I was wondering if there was a distinct advantage to either approach.
TIA
My thought has been to take a snapshot right before the backup is run, allowing the main VDI to be backed up without it being modified. From what I've read on the VirtualBox forums, it appears that the way to restore a VM on another host machine is to just create a new VM that uses the VDI from the backup. Indeed, I have found that trying to register an existing VM xml file from another host seems to cause trouble. Is this the best way to restore a VM on another machine (copy VDI and create a new VM), or is there a better way that I am missing? I have read a bit about the export/import functionality included in 2.2.0; is this functionality suitable for regular backups in a production environment?
Another thought I have been throwing around is using LVM snapshots for making backups as opposed to VirtualBox snapshots. They both seem to be a means to the same end, but I was wondering if there was a distinct advantage to either approach.
TIA