- Newest
- Most votes
- Most comments
To add to Agent's reply.
If this is Windows, you can take application-consistent snapshots of attached EBS volumes using AWS Systems Manager Run Command. The snapshot process uses the Windows Volume Shadow Copy Service (VSS) to take EBS volume level backups of VSS-aware applications. More information at Application consistent Windows VSS based Amazon EBS snapshots. AWS Backup also supports Windows VSS snapshots.
Let me address your questions about EBS snapshot behavior:
- When you create an EBS snapshot, the snapshot is created immediately at the point in time when the API call is made, but it remains in a 'pending' state until all data has been transferred to Amazon S3. The snapshot captures the data that was written to the volume at the time the snapshot command was issued. However, this might exclude any data that has been cached by applications or the operating system.
For a completely consistent snapshot, it's recommended to pause file systems or applications that might have cached data not yet written to disk. If you cannot pause all file writes, you should consider unmounting the volume, issuing the snapshot command, and then remounting the volume to ensure a consistent and complete snapshot. You can continue to use your volume while the snapshot status is pending.
- Regarding your concern about data integrity during the pending state: When a snapshot is initiated, Amazon EBS creates a point-in-time backup immediately. The snapshot mechanism ensures that even if you continue to use the volume and modify blocks that haven't yet been transferred to S3, the original data at the time of the snapshot request will be preserved in the snapshot.
The snapshot process works in the background and captures the state of the volume at the exact moment the snapshot was initiated. Any subsequent writes to the volume after the snapshot command is issued will not affect the data being captured in the snapshot. This means there is no risk of data loss from the snapshot under the conditions you described - if Block A is modified after the snapshot request but before it's transferred to S3, the snapshot will still contain Block A's state at the time of the snapshot request.
This asynchronous process allows you to continue using your volume without interruption while ensuring the integrity of the point-in-time backup.
Sources
CreateSnapshot - Amazon Elastic Compute Cloud
Create Amazon EBS snapshots - Amazon EBS
Relevant content
- asked 3 years ago
- asked 7 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 3 months ago
