Page 1 of 1
Live and/or automatic VM backups?
Posted: 24. Jan 2011, 19:45
by Red Squirrel
What is the best way to backup VMs in virtualbox 3.2? Does it have any way to back them up live and automaticly?
I'm trying to export as an appliance, but it takes up the GUI so I can only do one at a time. I'm also hoping there's a way to do a compressed backup. Not sure whether or not this export does it. I preallocate my space when I create VMs but I'm hoping the backups don't have to be that big.
I have 2 failing drives in my raid array and it just occurred to me the hell it would be to recreate all those VMs and rebuild all those environments if I get a total failure. File backups are nice but not enough. I need to back these up at least every couple months.
Thanks in advance!
Re: Live and/or automatic VM backups?
Posted: 24. Jan 2011, 21:48
by scottgus1
Can't help about live backups, with the VM running.
But the concensus on the forum in searches I did and questions I asked, is that a "dead" backup, that is, where the VM has been shutdown properly, is the best. Once it has been properly shut down - with NO snapshots attached, so merge them all in - copy the VDI or other flavor of virtual disk you use and the .Virtualbox folder to another drive. Then restart the VM, if desired.
I use this method to back up a SBS2003 installation and it seems to work fine.
Re: Live and/or automatic VM backups?
Posted: 1. Feb 2011, 03:55
by Red Squirrel
I guess for my needs I can get away with non live backups, though live would be nice.
Now is there a way through command line I can force stop a VM, then start it? My backup job sends a message to say to shut down the VMs about to be backed up, but if I run the job and forget to shut them or w/e I want it to be done automaticly. I also want them to be started back once the backup is done.
The kicker is the vms are not running as root, and the backups run as root, so how would I control the vms from the backup script? Also I'm running in console mode, not headless, so when the vms stop and then start, I would need the console to still be accessible from within the vm user.
Re: Live and/or automatic VM backups?
Posted: 1. Feb 2011, 04:47
by Perryg
Red Squirrel wrote:
Now is there a way through command line I can force stop a VM, then start it? My backup job sends a message to say to shut down the VMs about to be backed up, but if I run the job and forget to shut them or w/e I want it to be done automaticly. I also want them to be started back once the backup is done.
Sure is. Look in your VirtualBox users manual and VBoxManage. It's all in there
The kicker is the vms are not running as root, and the backups run as root, so how would I control the vms from the backup script? Also I'm running in console mode, not headless, so when the vms stop and then start, I would need the console to still be accessible from within the vm user.
Depends. If you are using a Linux host then you can run scripts as normal use and sudo the lines that require elevated permissions.