CityHost.UA
Help and support

Snapshots: what are they and why are they needed?

 8318
17.09.2021
article

Why is it so important to back up your data?

Data loss is the nightmare of everyone who works in the IT field or uses its services. Accidental file deletion or system failure can destroy important information and cause huge losses.

To prevent such situations, the ability to back up digital data for later recovery was developed. This is similar to the autosave in the game: if the hero is "killed", you can go back in time and fix everything.

When can data loss or destruction occur? The range of reasons is wide — from an earthquake to the inattention of an employee.

  • Technical damage.
  • Software crashes.
  • Employee mistakes.
  • Viruses and hacker attacks.
  • Force majeure (fire, robbery).
  • Natural disasters.

As you can see, there are many factors beyond our control. Therefore, saving copies of important information is a necessary practice for any IT specialist.

In this article, we will tell you what a server snapshot is, how a snapshot works and how to make it.

What is a snapshot and how does it differ from a backup

A snapshot is a snapshot of a file system that captures its state.

To better understand the technology, first you need to learn about another way of saving data - backup (backup from English - backup copy, duplication). It allows you to copy all data in full. A copy of the information is stored on an alternative medium in case the main device fails. When you save a folder with photos on a computer, flash drive, and cloud storage, that's a backup.

But backup has its drawbacks. This is a laborious process that takes time. While the files are being copied, changes may occur on the server , such as one of the users moving a file or creating a new partition. There are no such processes in the backup yet, and in the system a few seconds later, they already are.

Therefore, it is necessary to create a technology of not such a global, but faster backup copy.

Snapshots (according to another version of the pronunciation - snapshots) are created in order to instantly store information about the state of the virtual server and, if necessary, easily "roll back" it to the desired moment in time.

Many people confuse a snapshot with a backup, because these two methods have the same goal. But their work is based on a different principle.

Differences between Backup and Snapshot

backup

snapshot

is used to save any kind of data — files, folders, code, system, disk partitions

used in working with virtual machines, records only the current state

stored on a third-party medium

stored alongside the original data

requires a lot of resources and time, slows down system processes

it is done in a couple of seconds, minimally affects the operation of the system

is done only on the turned on equipment

can be done if the machine is turned off

can be stored for a long time

is stored for a short time and is automatically deleted

has a large size

compact and light

one version is stored in multiple copies on different media

the main disk can store several snapshots formed in a chronological chain

One cannot say that any of these methods is better or worse. The choice of backup technology depends on the task at hand.

What information is contained in snapshots

Snapshots capture the state of a virtual machine, its disks, and its contents.

They do not store files, but their locations, actions performed by the user or administrator, and other such information. For example, if a file is moved from folder A to folder B or deleted, the event is recorded. But the file itself is not saved.

A snapshot is not a complete copy, it will not save if the information has been completely destroyed. But going back and correcting mistakes is exactly what it was created for.

How snapshot works

When the snapshot is started, all subsequent changes are made to a new file instead of the main disk. To return to the previous state, it is enough to delete this file. If the changes were successful, you do not need to do anything - the information will be automatically overwritten to the main disk, and the snapshot itself will be deleted.

Snapshots work automatically on virtual servers and operating systems, taking a snapshot after certain time intervals. Optimally - once a day. This option can be adjusted. Since snapshots still take up space, they are not stored forever, but periodically deleted.

A snapshot can be run manually if you plan to upgrade or reconfigure the system. In the user environment, this technology is actively used by those who have Linux installed on their computer. Since this operating system is open source, it can be customized using commands in the terminal. But suddenly something will go wrong? It is quite simple to run the snapshot and experiment calmly.

Each company configures and uses snapshots depending on the specifics of its work, technical resources and customer needs. Therefore, the number of snapshots, their size and lifetime may vary.

Snapshots on Cityhost.ua

At Cityhost.ua, snapshot technology is used so that the client has the opportunity to restore the data that was relevant at the time of the creation of the snapshot in the event of updates, deployment, corrections and / or any changes to the virtual server.

There are special sections in the control panel that allow you to launch a snapshot manually and restore the state of the machine before it was launched. This is convenient for customers when they make changes to their site, configure their hosting or perform other tasks.

  1. The lifetime (storage) of snapshots is 24 hours.

  2. The maximum file size is 10 gigabytes.

  3. Only one current copy of the recovery point can exist.

You can learn more about how to work with snapshots from the video.

Snapshots are good insurance when working with virtual machines — without them, every mistake or malfunction would turn into a disaster. Thanks to this technology, you can safely make changes to the system, test the software, try new ways of working and not be afraid of experiments.

Read about how to use snapshots in Cityhost in the support section: How to use snapshots of the current VPS state .


Like the article? Tell your friends about it: