Command syntax to create a snapshot

Discussions related to using VirtualBox on Windows hosts.
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: just about all that run

Re: Command syntax to create a snapshot

Post by loukingjr »

I agree with mpack that the use of snapshots should be avoided. The only times I've used one snapshot is when I believed a major update to a Linux guest may break the guest and gives me a restore point. There are already too many users that think snapshots are a form of backup. Utilizing them to actually create a backup would only lead to more confusion. If VirtualBox was to have a "built-in" backup system, the word snapshot should not be included in the description of the feature.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: Command syntax to create a snapshot

Post by scottgus1 »

loukingjr wrote:Utilizing them to actually create a backup would only lead to more confusion.
If not unrestorable or at least questionable backups. I totally agree - don't use snapshots on a production guest. I only mentioned it to say that if someone is planning something similar to such a routine, these could be some of the problems with it.
kaplan71
Posts: 17
Joined: 9. Jun 2011, 17:41
Primary OS: Fedora other
VBox Version: OSE Fedora
Guest OSses: Ubuntu

Re: Command syntax to create a snapshot

Post by kaplan71 »

Hello --

One other thought occurred to me: As long as I have a backup of the virtual machine directories in place, I should be able to restore them in the course of a disaster recovery. The backup would be done through the use of a third party backup software agent installed on the host system. Once the Virtualbox software is reinstalled, in theory I should be able to configure it to go to the appropriate location, and recognize the virtual machine. The idea being the need for a snapshot would not be as paramount as I first thought.

This would be in addition to the backup software agent also being present within the virtual machine which would enable file and directory restoration within the virtual machine itself.

What are your thoughts on this?

Thanks.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: Command syntax to create a snapshot

Post by scottgus1 »

As long as I have a backup of the virtual machine directories in place, I should be able to restore them in the course of a disaster recovery. . . . Once the Virtualbox software is reinstalled, in theory I should be able to configure it to go to the appropriate location, and recognize the virtual machine
This part is correct and is a good backup.
The backup would be done through the use of a third party backup software agent installed on the host system.
Backing up a guest from the host should only be done while the guest is shut down, I believe. I'm not so sure that a backup agent in the host doing a backup of a live running guest will work. If Virtualbox would let the backup agent read the running disk files at all, the guest would be unaware that a backup is running and would be changing data all over its disk space while the host backup agent is trying to back up the guest.

Backup agents running on live OS's use some form of shadow copy (at least on Windows) to get files that are being used at the time. The agent tells the OS it wants to back up and the agent & OS cooperate to arrange back-up-able files. If the OS isn't informed then the backup will not have reliable data.

This post viewtopic.php?f=6&t=73860 describes someone that apparently tried what you're thinking and did not get good results. I'm not sure why, but something didn't work.

The backup agent running within the guest is a good idea, though. That one should work, since it can inform the guest OS of its intentions.

If the guest must stay up and running, then the only real option I would rely on is the backup agent in the guest itself. I would save the guest backup disk image on another virtual disk attached to the guest first. This will allow easy restores because the guest disk image would already be inside a virtual disk ready to attach to the guest. Restores would be easiest then. I would also copy the disk image to a network folder so it is also stored in the native host disk, so it can be restored outside Virtualbox if necessary.
Post Reply