Page 1 of 1
How to "test-restore" an .ova file with virtualbox
Posted: 27. Mar 2013, 12:16
by itiodo
Hello,
In order to back up a vm I tried the .ova-way. It needed 1h to export the 10G-file.
Now, how can I make sure that the file kept integrity? Is there a checksum or something?
Secondly, how can I securely perform a "test-restore" of the backup-.ova, without altering my vm-system in use?
Tia
Re: How "test-restore" an .ova file with virtualbox
Posted: 27. Mar 2013, 12:18
by mpack
Why bother? The best way to back up a VM is simply to make a copy of the VM folder, in which case simple file comparison allows you to test integrity.
Re: How "test-restore" an .ova file with virtualbox
Posted: 27. Mar 2013, 12:29
by itiodo
mpack wrote:Why bother? The best way to back up a VM is simply to make a copy of the VM folder, in which case simple file comparison allows you to test integrity.
Ok, thanks for this advice. I should have asked this before - instead of googeling. (;
Ok, but in both cases I would like to _test-restore_; could you or someone else explain how this could be done?
Tia
Edit:
I search around and I found in VBoxManager in the "file menu" the dialog "global options" and there "general settings" and in that I found "predefined path".
Is it adviceable to point this path to the backup folder (copy of the VM folder), start the backuppded vm, and, if everthing seems ok, point it back to its originally place?
Or is there maybe a more elegant way to do it?
Re: How to "test-restore" an .ova file with virtualbox
Posted: 27. Mar 2013, 12:48
by mpack
Again, why bother? Isn't it obvious that files copied off to a backup medium can be copied back? Does that really need to be verified? Part of the things which makes this the best backup strategy is that it obviously works.
The only practical way I can think of to test your backup is to delete the original VM, then restore it from the backup. Of course that sounds dangerous, so normally I would recommend making a backup first, but now we are into chicken and egg territory... I suppose you could clone the original VM first, before deleting the original.
All I would do is draw attention to the Machine|Add... menu item. When restoring a VM on a host where that VM UUID is not already registered, copy the VM folder to a convenient location then use Machine|Add to register the .vbox file in that location. Alternatively, when restoring a VM on a host where that VM UUID is already registered, simply overwrite the registered VMs folder contents with your backup files.
One last tip: after deleting a VM in VirtualBox, shut down VirtualBox entirely (the front end plus all VMs) and leave for 30 seconds so that the VBoxSVC background process unloads and forgets that the deleted VM ever existed. Otherwise you'll get UUID conflicts when you register the new VM.
Re: How to "test-restore" an .ova file with virtualbox
Posted: 27. Mar 2013, 15:04
by itiodo
Firstly, thank you for your tips. Without I would have surely run into problems. Especially the 30-seconds-rule.
So the only way to "test-restore" without previous deletion is on another system. - After copying has finished, I think, I will dare finding out how a real restore functions.
Re: How to "test-restore" an .ova file with virtualbox
Posted: 27. Mar 2013, 15:39
by mpack
itiodo wrote:So the only way to "test-restore" without previous deletion is on another system.
Well yes, though even that has limitations. A backup is sure to work on the original host. A different host might have a different CPU, different network card names to bridge to, various host drives and ports that do or don't exist. If you were setting out to port the VM to another host then these would be minor problems that are fixed in moments, but since your goal is to test how smooth a "restore from backup" operation is, well you would want to take those differences into account when judging it.
Re: How to "test-restore" an .ova file with virtualbox
Posted: 27. Mar 2013, 18:45
by itiodo
Ok, now after pressing the delete-button of a vm I found out, that there are two ways: Deleting all files or without it.
I was not knowing that!
Keeping the files I could "re-add" the original vm after a moment once again. Between deletes and re-adds one can replace/move the vm-folder of same UUID without big hassle. - I gonna trust it and consider the topic resolved.
Thanks