Page 1 of 1

Automatic Snapshots

Posted: 14. Nov 2010, 12:32
by martinz
Hello and I appriciate any help you guys can give me!

I've installed VBOX (3.2.12 r54655)on Solaris (10) on the following hardware:SUN Fire x4270,
I'm running WIN 2008R2 on it, my question are

1. Is there a way to configure on VBOX schedualed automatic snapshots? Without shutting down the virtual machine(s)?
2. If this is possible would there be any performance issues related to doing this, as I want to run MS Exchange with roughly 120 users on it?

If there isnt a way, are there other options? Without installing image based software in the actual OS (Win 2008R2).

I'd like to take a snapshot every 4-6 hours for backup and DR purposes.

Thanks in advance!

Re: Automatic Snapshots

Posted: 14. Nov 2010, 15:46
by Perryg
With the release number you show you are using version 3.0.12 of VirtualBox not 3.2.12. Anyway the CLI option to take a snapshot is found in VBoxManage in your VirtualBox users manaual. Create a script and crontab it.

Code: Select all

VBoxManage snapshot         <uuid>|<name>
                            take <name> [--description <desc>] [--pause] |
                            delete <uuid>|<name> |
                            restore <uuid>|<name> |
                            restorecurrent |
                            edit <uuid>|<name>|--current
                                 [--name <name>]
                                 [--description <desc>] |
                            showvminfo <uuid>|<name>

Re: Automatic Snapshots

Posted: 13. Jun 2013, 18:05
by pcooper
I have tried this.... what is missing is that you have not registered the virtual machine... also where does the snapshot go? how often are they taken? is there a time set up? I think alot of us users would love to see something like:
1) open terminal
2) log in as root
3) type the following: "XXXXXXXXXXX" (what ever it is needed to make autosnapshoting work)

I have been trying to make that work for DAYYYYYSSSSS and it has not functioned well for me.

Re: Automatic Snapshots

Posted: 13. Jun 2013, 19:52
by Guyver
normally not supposed to run vbox as root, so you would run the VBoxManage command as the user that is the owner of the VM - assuming that the user is a member of the vboxuser group as they'd have to be for it to work in the first place.

Also, remember that cron does not set the environment up as if you'd logged in - so any variables required for VBoxManage to function properly would have to be set manually within the cron script.

Snapshots usually reside in the Snapshots subdirectory under the VMs home directory.

Re: Automatic Snapshots

Posted: 13. Jun 2013, 20:16
by mpack
I suspect people are talking at cross purposes hence someone should point out the obvious: if you are trying to automate a backup process then that's great, but snapshots are not backups. Not even close. An automated script to copy your VM folder to secondary media - now that would be a useful thing to do.

Re: Automatic Snapshots

Posted: 14. Jun 2013, 19:14
by Guyver
The ability to rollback after catastrophic changes inside the VM is where snapshots shine.
I assumed that's what they were planning on using them for...

Re: Automatic Snapshots

Posted: 3. Jul 2013, 18:25
by martyscholes
mpack wrote:I suspect people are talking at cross purposes hence someone should point out the obvious: if you are trying to automate a backup process then that's great, but snapshots are not backups. Not even close. An automated script to copy your VM folder to secondary media - now that would be a useful thing to do.
Since no one else mentioned it, time-slider on the filesystem(s) holding the VMs will take snapshots. Using zfs send/recv will also allow for incremental updates to a secondary media. All can be had with very little hassle.

Re: Automatic Snapshots

Posted: 17. Apr 2014, 04:48
by chase.miller
If anyone is interested, I created a simple script that creates virtualbox snapshots. I created a cron job that runs this script every day (in effect, automatic snapshots).

You can grab the script at https://github.com/chase-miller/virtual ... hot-create.

Re: Automatic Snapshots

Posted: 10. Apr 2020, 13:08
by baldarim
I also created a script like chase, but in Python 3. In case someone wants an alternative (I needed to run it on Windows):

virtualbox-snapshotter on GitHub [ I cannot share links for now ]

Re: Automatic Snapshots

Posted: 10. Apr 2020, 17:06
by Pernat1y
6 years old topic. So hard to create a new one?

Re: Automatic Snapshots

Posted: 10. Apr 2020, 17:16
by mpack
The OP was talking about VirtualBox 3.x, in a topic created almost a decade ago. High time it was locked.