Snapshots#

General information#

Note

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.

Creating a snapshot#

A snapshot can be created using several methods:

  • from any volume, which is available or attached to the instance;

  • from an object loaded into bucket;

  • automatically when creating an image from an instance.

Creating a snapshot does not impact read/write operations – volumes can be attached, detached, or deleted without waiting for the snapshot to be created.

Important

For all company projects and users, you can simultaneously create a maximum of 16 volume snapshots.

Creating a snapshot from a volume#

To create a volume snapshot:

  1. Go to the Virtual machines section Snapshots.

  2. Click Create.

  3. In the window that opens, select the volume for which you want to create a snapshot. When selecting a volume, the Name tag field is automatically filled in. 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.

  4. 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.

  5. Click Create.

In addition, you can create a snapshot in the Volumes subsection. To do this, select the required volume and click Create snapshot. For convenience, specify the snapshot description and tags and click Create.

You can also create a snapshot on the instance page. Go to the Volumes tab, select the volume and click Create snapshot. Specify the snapshot description and tags, and click Create.

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.

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.

Creating a snapshot from an object#

You can create a volume snapshot from your own object. To do this, load an object to object storage and create an snapshot from it.

Creating snapshots along with an image#

When an image is created from an instance, snapshots of all volumes attached to the instance are automatically created.

Set access#

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:

  1. Go to Virtual machines Storage Snapshots and select the desired image in the table.

  2. Click Set access.

  3. In the dialog window, add project(s) that are to be granted access.

  4. Click Apply.

You can change snapshot access settings at any time:

  1. Go to Virtual machines Storage Snapshots, select the desired snapshot in the resource table and click on the snapshot ID to go to the resource page.

  2. In the Information tab, click the editing icon for the Common access parameter.

  3. In the dialog window, add or remove projects.

  4. 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.

Assigning tags#

To add, modify or delete snapshot tags:

  1. Go to the Virtual machines section Snapshots.

  2. In the resource table, find the volume snapshot for which tags should be modified and click on the snapshot ID to go to its page.

  3. Open the Tags tab.

  4. To add a tag, click Add tag and specify the Key and Value fields.

    To modify a tag, edit the required fields (Value and/or Key) of the respective tag.

    To delete a tag, click the icon next to the tag you no longer need.

    Note

    If no tags have been set earlier, you can add the Name tag by clicking Add Name tag and specifying its value.

    Note

    You can also modify the Name tag in the Information tab by editing the corresponding field.

  5. Click Apply to save the changes.

Deleting a snapshot#

You can delete your own snapshot if you no longer need it. To delete the snapshot, click Delete.

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.

Snapshot information#

Click the unique snapshot ID link to go to the page with detailed snapshot information.

The Information tab contains a description of the snapshot, status, project, creation date, size, and access details. Here, you can change the description and configure access to the volume snapshot.