What Is Snapshot?
A storage snapshot is a set of reference markers for data at a specific point in time. A snapshot is like a detailed catalog, providing users with an accessible copy of the data they can roll back to. Now, you can continue to read this post from MiniTool to get more information about the snapshot.
How Does Snapshot Work?
Storage snapshots are usually based on the use of differencing disk. A differencing disk is a special type of virtual hard disk that is linked to a parent virtual hard disk.
When an administrator creates a storage snapshot, the underlying system creates a differencing disk bound to the original virtual hard disk. All future writes are directed to the differencing disk, leaving the original virtual hard disk unchanged. The filesystem is completely unaware of the existence of diff disks. The file system continues to behave as if it were on a physical machine.
Snapshots have a parent-child relationship and form a tree. Each snapshot taken creates another branch of the tree.
Snapshots are usually created for data protection, but they can also be used for testing application software and data mining. Storage snapshots can be used for disaster recovery (DR) when information is lost due to human error. Snapshots can also be used to restore the system to a previous state if the wrong patch is installed.
Type of Snapshot
The implementation of storage snapshot technology varies by vendor. There are different types.
Here’s how a copy-on-write snapshot is created:
- Before creating a snapshot, the system stores the metadata of the original block.
- When the system executes a write command to a protected block, three IOs are triggered:
- Snapshot utilities read raw blocks before writing.
- Create/write snapshots of original blocks on reserved snapshot storage.
- The new data overwrites the original data.
Advantages: Since copy-on-write snapshots do not create a copy of the metadata, they are faster and almost instant.
Disadvantages: However, they are performance intensive as each snapshot requires one read and two writes.
Redirect-on-write snapshots use pointers to reference snapshot-protected blocks. Here’s how a read-write snapshot is created:
- The system executes write commands to make changes to snapshot-protected blocks.
- The snapshot utility redirects writes to the new block and updates the relevant pointers.
- The old data remains in place as a point-in-time reference to the original block.
Advantages: In contrast to copy-on-write, read-on-write snapshots consume fewer performance resources because each modified block generates a single write IO.
Disadvantage: redirect-on-write snapshots rely on the original block. Other modifications create new blocks. If the snapshot is deleted, the coordination between multiple new blocks and the original block becomes complicated.
Split Mirror Snapshot
A split-mirror snapshot creates a full copy of the original storage volume instead of only snapshotting the modified blocks. With split-mirror snapshots, you can create snapshots of entire file systems, logical unit numbers (LUNs), or object storage volumes.
Advantages: Easier data recovery, replication and archiving. Even if the primary/original copy is lost, the entire volume is still available.
Disadvantage: Since the snapshot utility takes a snapshot of the entire volume each time, this is a slower process and requires double the storage space.
Continuous Data Protection (CDP)
CDP creates frequent snapshots of raw data triggered by setting policies. Ideally, CDP snapshots are created in real-time. This means that every time a change is made, the snapshot of the original copy is updated.
Advantages: Reduces recovery point objective (RPO) to almost zero.
Disadvantages: Frequent snapshot creation and updates consume performance and bandwidth (if over network storage).
Snapshot vs Backup
Snapshot backups are primarily used to restore systems, virtual machines, and disks or drives to a running state and serve as a recovery point for the system when a snapshot was taken. It is not equivalent to a backup copy, it does not store data itself, but only defines where and how data is stored and organized.
Typically, snapshots are created using disk/system images or system restore and recovery software. However, most backup software can also take snapshot backups and restore the system using snapshots.