Hello Ruohan,
Thank you for your question and for reaching out with your question today.
Shadow Copies (also known as Volume Shadow Copies or Previous Versions) are a feature in Windows that allows users to restore previous versions of files or folders. They work by creating snapshots of the volume at different points in time. These snapshots are stored in the "System Volume Information" folder on the volume.
Here's how Shadow Copies work and why they seem to take up less space than the actual data:
- Differential Storage: Shadow Copies use a technology called "differential storage." Instead of storing complete copies of each file in every snapshot, they store only the differences (or changes) between the current version and the previous version. This way, the amount of space required for each snapshot is significantly reduced.
- Sparse Copies: Shadow Copies use sparse copies for files. A sparse copy is a type of file that contains large sections of zeros. When a file is deleted or overwritten, the sparse copy only needs to store the changed data, not the entire file, resulting in significant space savings.
- Copy-on-Write: When a file is modified or deleted after a snapshot is taken, the original data is not immediately removed. Instead, a mechanism called "copy-on-write" is used. The original data remains in the snapshot until it's needed to store a new version of the file. This helps maintain the integrity of the snapshots and allows for more efficient use of space.
- Snapshot Linking: When multiple snapshots are taken, they can share the same storage for unchanged data. This is achieved through snapshot linking. As a result, common data between different snapshots is not duplicated, leading to further space savings.
- Retention Policy: Shadow Copies have a retention policy that determines how many snapshots are kept and for how long. Older snapshots may be automatically deleted as new ones are created, depending on the settings.
Overall, Shadow Copies are designed to efficiently store previous versions of files while minimizing the storage space required. The technology used, such as differential storage, sparse copies, and copy-on-write, enables effective space management and allows for the creation of multiple snapshots without requiring a full copy of the data each time. This is why a Shadow Copy can seemingly take up less space than the actual data being referenced.
I used AI provided by ChatGPT to formulate part of this response. I have verified that the information is accurate before sharing it with you.
If the reply was helpful, please don’t forget to upvote or accept as answer.