This article explains how to create VSS consistent snapshots for Amazon EC2 Windows server.
Creating snapshots of servers which have database operations mid transactions can cause the storage of inconsistent data. Using VSS allows us to overcome this issue. VSS or Volume Shadow Copy Service provides a consistent point in time snapshot of a volume. VSS is a Windows built-in application that allow the backup of VSS-compatible applications (SQL Server, Exchange Server, SharePoint, Active Directory etc).
Powershell scripts are executed on the Windows Instance VSS agent using AWS’ ‘Run Command’, to generate a consistent snapshot. In simple terms the following process is followed:
- The volume is frozen with the write operation suspended.
- Writes during the frozen period have been buffered, and any new data will be written after the volume is unfrozen.
- The snapshot is generated.
- The snapshot is stored.
- The volume is unfrozen and the write operation is resumed.
When generating a consistent snapshot on a Windows instance the VSS agent needs to be installed on the server. Most Windows servers should have VSS already installed.
When the 'CONSISTENT SNAPSHOTS' checkbox is selected, this Backup Policy will generate consistent snapshot for any Windows servers with VSS installed. If any servers included in the backup policy do not have VSS installed, then a standard, native AWS EBS snapshot is generated.
The functionality for consistent snapshots of Linux servers within CloudRanger is also coming soon.
*If you were an existing CloudRanger customer before October 27th 2017, you may have to update your existing AWS account credentials to make use of this functionality.