SnapShot
The essence of the technology
At the moment of creating a snapshot, writing to the disk drive stops, which allows you to take a snapshot of the disk and perform all further operations in a separate file.
To retrieve data from the disk in the future, you must first read the contents of the snapshot, then link and account for all disk operations that were performed after the snapshot was created and recorded in a separate file.
If you need to restore a virtual machine or file to its original state, simply delete the files with changes and continue using the disk from the moment the snapshot was taken.
SnapShot of file systems and virtual machines
A virtual machine is a file containing data that includes the contents of a virtual hard disk, RAM, processor registers, and a description of the virtual machine configuration in a language that the hypervisor can understand.
Therefore, you can do everything with a virtual machine that you can do with file systems, including creating copies (snapshots) of them. Once such a copy is created, it is written to the hard disk.
All subsequent changes to the virtual machine or file system will be written to another file, and all further work will be reduced to changing that file.
If, after some time, you create another snapshot, a new file will be created in which all changes will remain recorded. And there is always the option to return to a specific snapshot.
Features
The snapshot creation technology has the following features:
- snapshots are stored near the virtual disks on which they are created;
- the number of snapshots is constantly growing, and their size can exceed the size of the file system or virtual machine itself;
- snapshot files are reserved dynamically, which negatively affects machine performance;
- The “lifespan” of each snapshot should not exceed 72 hours, otherwise the virtual machine will slow down significantly.
And even though many people refer to SnapShot as a type of backup, file system snapshots cannot be considered a full backup, as they only contain the history of file changes.