Safety and security of data is an urgent matter for any business. Unlike physical servers, clouds have much broader capabilities in this area. For example, you can completely restore a virtual machine disk "from the past". This is available thanks to a useful tool called snapshots. We are going to tell you about the conditions under which snapshots are created and how to store two snapshots of each disk of a client's virtual machine.
Snapshots are complete shots of client virtual machine disks that we create regularly. For all users of TuchaFlex+ and TuchaBit services, we take snapshots and store the last two snapshots of each client disk. The cost of creating and storing snapshots is already included in the cost of renting servers.
What are snapshots for? Snapshot can be used to restore a machine disk to the state it was at the moment of the snapshot creation. Also, a snapshot can be uploaded for future use as an image of a new virtual machine or added as an additional disk to any server within our cloud infrastructure.
Let us remind you how snapshots are created. During snapshot creation, a virtual machine stops. The pause can last from a few seconds to a few minutes, depending on the disk size and the size of data that has changed since the last snapshot was taken. During this time, the snapshot has the status Creating. When the snapshot is created, it gets the status BackingUp and the virtual machine resumes operation. Then the snapshot is copied from the main storage to the backup. This process takes from several minutes to several hours, the exact time depends on the size of the disk. This does not affect the operation of the virtual machine in any way. After that, the snapshot is deleted from the main storage, and the virtual machine stops operation for a short time. When the snapshot is deleted from the main storage, the virtual machine will continue operation, and the snapshot saved in the backup storage will get the status BackedUp.
We create snapshots between 20:00 and 06:00. For one single storage, no more than two snapshots can be created simultaneously, and only one snapshot can be in the Creating phase. It is allowed that another snapshot at this time has the BackingUp state.
In what order are snapshots created? In the queue, the disks for which the last saved snapshot was created before the others have higher priority. There is an intelligent algorithm that determines their queue, considering "age" of the last images and the workload of the infrastructure.
For a specific virtual machine, you can shift snapshot creation time or make the interval narrower. However, you should consider that if you narrow the timeframe too much, the probability that the image will be taken during this period is significantly reduced. This happens because the other probability is increasing. Within the indicated timeframe, the storage will be creating the snapshot of another disk. Therefore, if the user still wants to narrow the time interval for creating images, we recommend setting the gap at least 3-4 hours.
A virtual machine can also give up its queue in another case. If it is performing disk operations with intensity greater than 1024 KB/s during a snapshot time. That is why snapshots are not always created strictly every night.
Of course, you can ignore the general queue and activity indexes of the virtual machine. In other words, you can create snapshots strictly at certain hours and days (for example, once a day at 4:20). However, there are certain risks appear. For example, there is a risk of data corruption inside the server, because the operating system may start writing some data while snapshot creation. This data will not be written due to the pause in the virtual machine operation necessary for creating the snapshot. As a result, the file system can theoretically lose consistency (integrity), which will lead to damage or loss of some data.
If different snapshot creation time is convenient for a client, they can change the schedule. To do this, you just need to contact our technical support service, and we will organize everything.
Any snapshot can be marked with the noremove tag with the value 1. This means that it will not be automatically deleted, changed, or overwritten (although it can be deleted manually). This tag should be installed on the snapshot itself, not on a virtual machine or disk. Note that if both snapshots are marked with the noremove tag, new images will be created, but will not be saved. It means that the latest snapshots will not appear.
A virtual machine or its disk can also be marked with the nosnapshot tag with the value 1. In this case, automatic snapshots will not be created until the tag is deleted.
Note a crucial moment concerning both the noremove and nosnapshot tags. The Value field must contain the exact marks lifetime.
You can set the time in one of 3 formats:
- %Y%m%d%H%M%S (for example, 20191231235959);
- %Y-%m-%d %H:%M:%S (for example, 2019-12-31 23: 59:59);
- %H:%M:%S %d-%m-%Y (for example, 23: 59:59 31-12-2019).
Other formats will be ignored.
Why is it important? For example, in the case of the nosnapshot tag, if the time is set in a different format, it will be assumed that there is no tag at all.
If the user is really sure that snapshots of their virtual machine should never be created, they can set the value, for example, 9999-12-31 23:59:59. This is necessary to avoid cases when users set the nosnapshot tag and forget that it is time to remove it.
You can add tags using the server control panel.
For all clients that use virtual machines based on the TuchaFlex+ and TuchaBit services, we store the last two snapshots for each user's disk. As soon as a new snapshot is created, the oldest snapshot that does not have the noremove tag is permanently deleted. This is the way to ensure that two actual images are always available.
You can create and store a larger number of snapshots for an extra cost. For example, if the client's IT infrastructure is frequently changed or there is a need to access sometimes the data that they previously worked with.
Snapshots are full shots of all virtual machine`s disks. Backups are copies of individual files on a disk. Only snapshots can restore the machine disk to the state it was at the moment of the snapshot creation. Backups can also help you restore individual files, for example, if they are deleted, damaged, or modified. We recommend users to use these tools together to assure maximum security of their data.
Snapshots are an important tool for protecting data in the cloud. It will help you save information on the disk and restore it even in case of critical changes.
As a responsible provider that cares about the security of the customers' data, we provide snapshots by default. Write to us at firstname.lastname@example.org or call +380 44 583-5-583 if you need help from the Tucha team in solving any cloud tasks. We are in touch 24×7!