Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VirtualBox - Clone vs Snapshot vs Backup

Tags:

Looking for a simple answer to some virtualbox options.. What are the differences between Clone & Snapshot & Backup? Which should be used when?

I've just started with virtualbox & have Ubuntu running on OS X as host.

Basically i have setup Android SDK & ADK and other tools. Just before i start building, i want to have a "backup" where if anything goes wrong, i can just revert to this instance of a clean installation. Previously i had a situation where Ubuntu locked me out completely & i was unable to do much other than a complete re-install.

Would it be just alright to have a snapshot & revert to this snapshot if something goes wrong? Or would i need a clone of it? or both? and to backup, is it just sufficient to have a copy of the folder alone?

thanks

like image 264
user283471 Avatar asked May 22 '14 17:05

user283471


People also ask

What is difference between snapshot and clone?

A storage snapshot is taking that original picture, and then each subsequent picture is only of the difference from the previous one. So a clone is making a complete copy of something, while snapshots make one initial copy, then just make simple subsequent changes.

What is the difference between VM snapshot and backup?

The main distinction between backups and snapshots is that backups are independent, self-contained files that don't require cross-file dependencies to restore a VM, whereas snapshots rely on dependent files for VM restoration.

What are the 2 types of clones provided by VirtualBox?

Full Clone: Copies all dependent disk images to the new VM folder. A full clone can operate fully without the source VM. Linked Clone: Creates new differencing disk images based on the source VM disk images.

Why snapshot is not a backup?

Snapshot by itself is not a backup. But it can be used as an essential part of the backup process. Snapshot is used as a part of the data movement process to a backup file. It is removed when the backup job is completed.


1 Answers

Clone: Duplicates your VM. It can be a linked clone referenced to your original VM via a snapshot, or it can be a full clone. You can create a clone to compact your disk image like VMware's Compact tool: use your virtualized OS to fill your free space with zeroes (Eraser Portable on Windows, cat /dev/zero > ~/dsfargegfgsfds then rm ~/dsfargegfgsfds on Linux), delete any temporary files, and clone your VM; the new disk image will be created without the zeroed-out free space.

Snapshot: A kind of restoration point. When you create a snapshot VirtualBox will start saving new writes to the virtual disk to a differential image, when reading it will take into account the differential image as well as the drive. When you restore a snapshot you're basically telling VirtualBox to ignore the snapshots that don't lead to the specified restoration point.

Export: A packaged archive that contains your VM's hard drive image and configuration.

In my experience VirtualBox is a flimsy and fickle program that can fail unexpectedly in terrible ways (right now I'm trying to rescue a disk image that corrupted due to a program crash), so back up very often. Back in college I must have accumulated like 25 GB of VM backups out of a VM that was, like, 2 GB tops, because for every single little thing I had to export my progress or risk losing days of work and missing an assignment deadline.

like image 154
RAKK Avatar answered Oct 08 '22 19:10

RAKK