![]() |
An Up Close Look at the Volume Shadow Copy Services One of the big problems with backing up database applications is that oftentimes the data is modified before the backup can complete. Needless to say, modifying data while a backup is running can result in a corrupt backup. In an effort to keep this from happening, Microsoft uses the Volume Shadow Copy Services (VSS) to make sure that database applications are backed up in a consistent state. This article explains how the Volume Shadow Copy Services work. The VSS Components There are four main components that make up the Volume Shadow Copies Services. These components include:
These components work together to provide the VSS backup capabilities.
Creating a Volume Shadow Copy The process of creating a volume shadow copy begins when the requestor (which is usually built into backup software) notifies the Volume Shadow Copy Service that a shadow copy needs to be created. When the Volume Shadow Copy Service receives this request, it in turn notifies all of the individual VSS writers of the impending shadow copy. When the individual writers receive the request, they take steps to place data into a consistent state that is suitable for shadow copy creation. The exact tasks that the writer performs varies from one application to another, but generally writers prepare by flushing caches and completing any database transactions that are currently in progress. If the application makes use of transaction logs, the logs may be committed as a part of the process as well. After all of the VSS writers have prepared for the shadow copy, the Volume Shadow Copy Service instructs the writers to freeze their corresponding applications. This prevents write operations from occurring for the duration of the shadow copy (which takes less than ten seconds to complete). When all of the applications have been frozen the Volume Shadow Copy Service instructs the provider to create the shadow copy. When the shadow copy creation is complete, the provider notifies the Volume Shadow Copy Service of the completion. At this point, the Volume Shadow Copy Service once again allows file system I/O and it instructs the writers to resume normal application activity. The shadow copy creation process revolves largely around the task of coordinating VSS writers so that the various components of the operating system and any applications that are running on the server can be backed up in a reliable and consistent manner. Even though the individual writers do most of the heavy lifting, it is the provider that ultimately creates the shadow copy. There are actually several different methods that can be used for shadow copy creation. The actual method used varies from one provider to the next. As you may recall, providers can exist as an operating system component, or it can exist at the hardware level. The shadow copy creation process that is used varies depending on the type of provider that is being used. There are three main methods that providers typically use for creating shadow copies. The first method is known as a complete copy. A complete copy is usually based on mirroring. A mirror set is created between the original volume and the shadow copy volume. When the shadow copy creation process is complete, the mirror is broken so that the shadow copy volume can remain in a pristine state as it existed at the point in time when it was created. The second method that is sometimes used for shadow copy creation is known as Redirect on Write. Redirect on Write is based on the use of differencing disks. The shadow copy process designates the original volume as read only so that it can be kept in a pristine state as it existed at the point in time when the shadow copy was created. All future write operations are redirected to a differencing disk. This method is also sometimes referred to as snapshotting. The third method that providers sometimes use for shadow copy creation is known as copy on write. This is block level operation that is designed to preserve storage blocks that would ordinarily be overwritten. When a write operation occurs, any blocks that would be overwritten are copied to the shadow copy volume prior to the write operation. Conclusion As you can see, the process of creating a shadow copy is relatively straightforward. You can gain some additional insight into the process by opening a Command Prompt window and entering the following command: VSSADMIN List Writers This command displays all of the VSS writers that are present on the system and also shows you each writer’s status. Hope you found this helpful! ![]() |
Update your feed preferences | |
![]() ![]() ![]() ![]() ![]() ![]() |
