SOLVED: What Is The Difference Between a Snapshot and a Backup?

In the old-days, there were backups and while people were confused about the differences between a full backup and an incremental backup, they understood the general concept.  A backup is a copy of your files or an entire server.

Then in the mid-2000’s we started hearing about this crazy thing called virtual machines in which one physical piece of hardware could run many completely distinct operating systems at the same time. Virtual machines then gave birth to the notion of snapshots.

Snapshots are not a copy of your data. Snapshots are not a backup.

What is a Snapshot / Checkpoint?

A snapshot can be thought of as a two disk raid set. When you take a Microsoft Hyper-V Checkpoint or VMware Snpashot what you’re actually doing is freezing the current hard drive at a point in time and adding a second hard drive which is where all of the subsequent changes are stored.

How Are Snapsots & Backups Different?

 

So as you can see snapshots really are substantially different from backups. In fact if you run with a VM Ware snapshot for more than a few days it will start complaining and giving you error messages because snapshots are not intended to be around for very long. Contrast that with the backup that you could keep for months or often years.

Backups can be taken off site whereas snapshots are live files that need to be wherever your infrastructure is.

You can delete your backups at anytime and nothing will happen to the production servers. However, if you delete your snapshot / checkpoint files instead of merging them your virtual machines will crash and be corrupted.

How Is an Azure Snapshot Different From a Regular Snapshot?

If you work with virtual machines running in Microsoft Azure you’ll be frustrated to learn that their snapshots are actually just backups. That might bring you to ask what the difference is between an Azure snapshot and an Azure backup.  The only practical difference between an Azure snapshot and an Azure backup is that a backup MUST be scheduled and the scheduling that Microsoft makes available is not very broad.

In fact if you have to rollback in Azure virtual machine to a snapshot you actually have to use that snapshot file to create a brand new VM and replaced the old one.

What Files Does a Snapshot Create?

A VMware Snapshot creates .vmdk, -delta.vmdk, .vmsd, and .vmsn files.  The -delta.vmdk is stored wherever the .vmdk file is while the .vmsd and .vmsn files are stored in the virtual machine directory.

Here are the detail direction from VMware:

Delta disk files A .vmdk file to which the guest operating system can write. The delta disk represents the difference between the current state of the virtual disk and the state that existed at the time that the previous snapshot was taken. When you take a snapshot, the state of the virtual disk is preserved, the guest operating system stops writing to it, and a delta or child disk is created.

 

A delta disk has two files. One is a small descriptor file that contains information about the virtual disk, such as geometry and child-parent relationship information. The other one is a corresponding file that contains the raw data.

 

The files that make up the delta disk are called child disks or redo logs.

 

Flat file A -flat.vmdk file that is one of two files that comprises the base disk. The flat disk contains the raw data for the base disk. This file does not appear as a separate file in the Datastore Browser.

 

Database file A .vmsd file that contains the virtual machine’s snapshot information and is the primary source of information for the Snapshot Manager. This file contains line entries, which define the relationships between snapshots and between child disks for each snapshot.

 

Memory file A .vmsn file that includes the active state of the virtual machine. Capturing the memory state of the virtual machine lets you revert to a turned on virtual machine state. With nonmemory snapshots, you can only revert to a turned off virtual machine state. Memory snapshots take longer to create than nonmemory snapshots. The time the ESXi host takes to write the memory onto the disk depends on the amount of memory the virtual machine is configured to use.

A Microsoft Hyper-V checkpoint creates a single .AVHDX file that file contains not only the data but the state of the virtual machine and the hardware configuration of that virtual machine at the time it was created.

You also might run into what’s called an AutoRecovery.AVHDX file .  These autorecovery.avhdx files are created automatically buy the hyper V volume shadow copy service (VSS writers).  They are simply used have to make sure that a virtual machine that is being backed up is in a consistent state and not halfway through transactions so that if you were to restore it it would be functional.

Can Snapshot / Checkpoint Files Be Deleted Manually?

In most cases you cannot and most definitely should not delete .AVHDX files or .delta-VMDK files.

Because checkpoint and snapshot files are part of the underlying hard drive your virtual machine it’s running on, those files are in use when the virtual machines are powered up and if you were to delete them when the machine is powered down you would corrupt the virtual machines.

There are very rare times when have these checkpoint and snapshot files are not automatically deleted by VMware or HyperV.  As such both Microsoft and VMware have processes for dealing with orphaned checkpoint and snapshot files.

View Comments

Published by
Ian Matthews

This website uses cookies.