Snapshots
In this article:
Snapshots#
General information#
Attention
Be careful when using licensed software. License cloning is not allowed in some cases.
A snapshot is a copy of the file system and data on the volume at a certain point in time. A snapshot is a reference for creating new volumes and can be used as a backup copy or to distribute operating systems and software.
All snapshots are grouped according to the following criteria:
K2 Cloud snapshots – volume snapshots that K2 Cloud offers;
own snapshots – snapshots created by the user in the Snapshots subsection;
shared snapshots – snapshots accessible to the user.
Own and shared snapshots can also include snapshots created during the backup process. To display them in the resource table, enable Show recovery points.
Data consistency#
You can take a snapshot of a volume even it is attached to a running instance. However, this can result in an inconsistent snapshot.
Read/write operations inside the instance are not blocked, and the RAM may contain cached file system data that has not yet been written to the volume at the time when the snapshot is created. It is important to note that a volume snapshot will only contain data that is present on the volume.
To ensure snapshot consistency, you can stop the instance or flush the cache, pause writing to the respective volume, and run the command to create a volume snapshot.
Billing#
Snapshots are charged hourly according to the size of the original volume.
Available quotas#
The following default quotas are allocated for snapshots:
210 snapshots in each project;
45 simultaneously created snapshots in each project.
If necessary, you can increase quotas. To do this, contact the support service via the support portal or by email support@k2.cloud.
Managing snapshots#
Creating a snapshot#
A snapshot can be created using several methods:
Creating a snapshot does not impact read/write operations – volumes can be attached, detached, or deleted without waiting for the snapshot to be created.
Creating a snapshot from a volume#
To create a volume snapshot:
Go to Virtual machines Storage Snapshots.
Click Create.
In the window that opens, select a volume for which you want to create a snapshot. Selecting the volume fills in the field with the Name tag automatically. If necessary, you can modify it and add a description for the volume snapshot. To add other tags, click Add tags. If no tags are required, skip the next step.
To add a tag, click Add tag and enter tag key and value.
Note
If no tags have been set yet, you can add the Name tag by clicking Add Name tag and specifying its value.
Click Create.
Alternatively, you can create a volume snapshot in the Volumes subsection and on the instance page, to which the volume is attached.
Note
A volume snapshot is created immediately, but you can create another snapshot of the same volume only after it is transferred to a storage of snapshots.
Copy a snapshot#
The volume snapshot is available in the region where it was created. You can copy the snapshot to another region or make a copy in the same region.
By copying a public snapshot or snapshot from another project into your own project, you will be able to continue using it if, for example, the snapshot owner decides to delete it or restrict access.
Important
You cannot copy snapshots created during backup.
Go to Virtual machines Storage Snapshots and select the desired image in the table.
Click Copy.
In the window that opens, specify:
the Name tag as the name of the snapshot copy;
the description, for example, what data it contains;
the region to which the image should be copied.
To add other tags, click Add tags. If no tags are required, skip the next step.
To add a tag, click Add tag and enter tag key and value.
Note
If no tags have been set yet, you can add the Name tag by clicking Add Name tag and specifying its value.
After setting all the required parameters, click Copy.
Alternatively, you can copy the snapshot in the Information tab on its page.
Set access to a snapshot#
A snapshot is private by default and available only within the project in which it was created. If necessary, you can grant other projects the access to the snapshot.
To set access rules:
Go to Virtual machines Storage Snapshots.
In the resource table, select the desired snapshot and click Set access.
In the window that opens, add project(s) that are to be granted access.
Click Apply.
You can change snapshot access settings at any time:
Go to Virtual machines Storage Snapshots.
Find the snapshot in the resource table and click the snapshot ID to go to its page.
In the Information tab, click the editing icon for the Common access parameter.
In the window that opens, add or remove projects.
Click Apply.
Note
You can use both procedures for initial access setting, as well for access editing.
Attention
It is strongly recommended to avoid distributing snapshots with a preset system administrator password. A random password can be generated at the system launch and displayed to a user via a remote console.
Note
Before 02.08.2022, public access to the snapshots could be granted to all authorized K2 Cloud users. If you have public snapshots, you can make them private by clearing the respective checkbox when setting the access to the image. This operation is irreversible: you cannot make the image public again.
Deleting a snapshot#
You can delete your own snapshot if you no longer need it.
Go to Virtual machines Storage Snapshots.
In the resource table, select the snapshot and click Delete.
Confirm deletion.
Note
Deleting a snapshot does not impacts volumes created from it.
Note
To delete snapshots that were created together with an image, delete the image.
Creating a volume from a snapshot#
To create a volume from a snapshot:
Go to Virtual machines Storage Snapshots.
In the resource table, select the desired snapshot and click Create volume.
In the window that opens, you can edit the default parameters of the snapshot:
Name tag;
availability zone;
volume type;
volume size;
IOPS (only for
io2volumes);
Note
The throughput is set automatically depending on the volume type and size.
To add other tags, click Add tags. If no tags are required, skip the next step.
To add a tag, click Add tag and enter tag key and value.
Note
If no tags have been set yet, you can add the Name tag by clicking Add Name tag and specifying its value.
Click Create.
Snapshot information#
General information about available snapshots can be viewed in the resource table in Virtual machines Storage Snapshots.
To open the page of a particular snapshot, click its ID in the resource table in the Snapshots subsection.
The Information tab displays the main snapshot parameters:
snapshot name (Name tag);
description;
state;
creation date;
size;
access information;
project(s), which can access the snapshot.
Here you can modify the snapshot name (Name tag) and description, and configure access to the snapshot.
The Tags tab displays all tags assigned to the snapshot. You can add new, modify existing, and delete no-longer-needed tags.