How does Windows VSS Snapshot work?
How does VSS Snapshot work?
If any files are opened or constantly being changed with data sets or some high I/O operations, it becomes a difficult job to back up that file because the file could be in an inconsistent state.
If there is any database file like ntds .dit, DB file,etc which experience a high I/O in business hours,and if these files are not continuously monitored and backed up which contains mission-critical data of an organization, any single disaster or fault can cause damage to that organization.
So, to have an HA or BAU architecture maintained it is always advisable to back up those data in a certain period of time based on their RPO and RTO SLA agreement.
But to have any backup in place while the data are always in an inconsistent state, is rather a tedious process.
The solution for these came from the Microsoft VSS service.
It takes advantage of concept Point in time Snapshot.
So, here it comes Microsoft Volume Shadow Copy Service, which was first introduced with server 2003 and with client OS like XP and higher with “Previous Version” feature.
Let me try to put things in order for a better understanding of how this entire process of taking snapshot works.
VSS or Volume Shadow copy Service has these three main components.
- VSS Service
- VSS Requestor
- VSS Provider
- VSS Writer
Again Vss Provider divided into three categories
- Hardware &
Requestor requests for a shadow copy.
The provider receives that request and lets VSS service know about that.
VSS service talks to Writer to prepare data for a shadow copy.
The Writer makes the data available for taking the snapshot and lets VSS know about that.
VSS then talks to the provider to create the shadow copy.
Let’s understand that in detail.
VSS Shadow copy service is the most important component among all who co-ordinates with all other components for a smooth and most successful process.
VSS Requestor is the actual software that requires the shadow copy, it is generally the backup agents installed on the system or Microsoft native requestor.
This component makes the data available for taking a snapshot, so it has to be kept in mind that the services associated with these components should be in a Stable state.
A few of the services are mentioned in the below screenshot.
This component is responsible for creating and maintaining the shadow copies.
Now the question is how the VSS shadow copy creates?
When VSS Writer gets a request from VSS Service to prepare data for shadow copy, Each Writer simply prepares an “XML” format description of components and data stores that need to be backed up and wait for VSS Service instruction.
When VSS service instructs each writer to prepare their data for a snapshot.
Each writer prepares the data as appropriate, such as completing all open transactions, rolling transaction logs, and flushing caches. When the data is ready to be shadow-copied, the writer notifies the Volume Shadow Copy Service.
Now if any of the files are in an n state or in an inconsistent state, VSS service again instructs VSS writers to freeze the applications for a couple of moments.
Now the Writers get only a maximum of 60 sec to free the I/O operations to this application while the shadow copy is taken.
The Volume Shadow Copy Service flushes the file system buffers and then freezes the file system, which ensures that the file system metadata is recorded correctly and the data to be shadow-copied is written in a consistent order.
VSS service then immediately let the provider know to create the shadow copy. For this shadow copy creation, the provider gets only 10 Seconds.
The Volume Shadow Copy Service releases the file system to write /O requests.
VSS tells the writers to resume writing data to the disk that is being shadow-copied.
We will write more blogs like this. visit our page for more interesting blogs
Apart from Cloud Migrations Services, you can also Contact Lia Infraservices the expert Digital Marketing Company in Chennai and the no.1 SEO Company in Chennai also the proven Mobile App Development Company in Chennai for your all kinds of Android and iOS Mobile App Development Services for your business needs.