Snapshot is a critical component of VMware backup. it’s very important that you understand the role of the VMware snapshot and how VM backup and restore works.
Basic operation
The process of VM backup begins with the backup software taking a VMware snapshot of the VM and it performs two main tasks.
First quiescing of the virtual machine and flushes the disk contents out of the file system cache. This control both the OS and application versions of Microsoft Volume Shadow Copy Service (VSS) safeguards that files may be locked and in use inside Windows are released in such a way that a full backup is possible to occur. If there is an issue with any third-party providers or the VSS service itself, the snapshot operation may fail it will effect backup operation.
Here VMware Tools have a major role over here, VM Tools used to quiesce the file system in the virtual machine. Quiescing a file system is a process of bringing the on-disk data of a physical or virtual computer into a state suitable for backups. This process might include such operations as flushing dirty buffers from the operating system’s in-memory cache to disk, or other higher-level application-specific tasks.
How Tools helping
When using the VMware Snapshot Provider service in VMware Tools, you start the process of creating a new Volume Snapshot Service (VSS) snapshot inside the guest operating system (OS). All the registered VSS writers receive the request and prepare applications for backup by writing transactions from the memory to disk. When the VSS writers finish this operation, they report to the VMware Tools Service via the VMware Snapshot Provider that the job is complete and the system is ready for a snapshot.
You can check the registered VSS writers by running command inside the operating system vssadmin list writers
Second, the VMware snapshot unlocks the files that make up a VM from the file system. When a snapshot is involved, each virtual disk receives a snapshot delta like “vmname-00001.vmdk”. From this point onwards, all disk changes accrue in the delta files, which grow in increments of 16 MB. This give the permission to the files that make up the VM, such as the VM’s configuration file (VMX) and virtual disk files (VMDK), free to be archived.
Without the snapshot involvement, the files would be locked by the ESX server that “owns” that VM when it is powered on. The situation is similar to when you try to copy or move a file which already accessed by an application.
How Snapshot effect your Virtual environment
s we know there are a number of challenges associated with the use of snapshots. The longer the snapshot keeps, the larger the delta files and snapshot size will be increased with VM data. This will lead to performance impact and it will consume you all free space available on datastore. Also it will lead to an outage of your virtual machine which is having snapshot as well as other virtual machines resides on the datastore due to insufficient space.
One of the other main concern is how the backup solution will handle snapshot removal. Once the backup job has completed, an instruction will be sent either vCenter or directly to the ESX servers to remove the snapshot from the virtual machine. Any failure on communication from the backup system to the management layer of vSphere will result an “orphaned” snapshots after backup Job.
Most of the backup solution will create a log and alert on same to notify that there is failure on snapshot removal. And real scenario backup solution is not that much intelligent to identify those orphaned snapshot and remove those on the next backup runs.
Restoration
There is multiple option we will get with backup solutions for restoration, mainly there are two methods used by backup solutions
First, the backed-up VMDK files are taken from a shared location accessible to the ESX hosts and “hot-added” to the VM to which they need to be recovered. The result is that the virtual machine will have a new drive added to it while it is powered on. This appears as new drive with “ X “ letter , and this allows the application owner of the VM to restore files using Windows Explorer. Also some solution will allow you to view the file from the restore window and you can select from there and perform restore.
Second, the entire VM will be restored as a new virtual machine to original location or different location, later using Storage vMotion to relocate the restored VM to its rightful location.
Note: – Now days vendors are coming with more options such as instant, point in time recovery etc .
One of the important thing we have to consider in virtual machine backup is backup type such as Full or Incremental.
Full virtual machine backup processing stores a backup copy of all virtual disk images and configuration information for a virtual machine.
Advantages
With full virtual machine backup processing, you get faster data movement than a file-level backup.
Disadvantages
An incremental backup of a virtual machine backs up all changes that occurred since the previous backup of the virtual machine, whether the backup was a full backup, or another incremental backup.
Advantages
Incremental backup processing backs up changes to virtual machines between full virtual machine backups.
Disadvantages
In virtual machine backup mainly forever incremental backup is the best or not? Find out from below mentioned advantages and disadvantages.
Advantages
Disadvantages