Volume Snapshots

Snapshots capture the state of a volume and store the difference between the changing data on the virtual machine volume and the state of a volume at a particular point in time (when the snapshot is created). This allows you to copy volumes to clone a virtual machine, change the volume type, or create a backup. A snapshot is not a backup of the virtual machine volume, because it is saved on the same equipment and requires the availability of the main storage to perform any operation.

Viewing Snapshots

Viewing Snapshots in the Control Panel

To view a snapshot, open the volume card in the project, go to the Volumes section and open the Snapshots tab. A list of existing snapshots, their names, and creation dates will be displayed.

Viewing Snapshots through CLI

Learn more about getting started with the OpenStack CLI.

To view a list of all snapshots, run the following:

openstack volume snapshot list

The response will look as follows:

+--------------------------------------+---------------------+-------------+-----------+------+
| ID                                   | Name                | Description | Status    | Size |
+--------------------------------------+---------------------+-------------+-----------+------+
| cb74e550-fa96-4a9c-b685-ecb078966339 | test_snapshot       | None        | available |    5 |
| 39dc0cb2-6818-4b12-88fc-b2d139335a75 | snap-26.03.20_13.22 | None        | available |   25 |
+--------------------------------------+---------------------+-------------+-----------+------+

To view snapshots of a specific volume, run:

openstack volume snapshot list --volume <volume>

To view information about a snapshot, run:

openstack volume snapshot show <snapshot>

The response will look as follows:

+--------------------------------------------+--------------------------------------+
| Field                                      | Value                                |
+--------------------------------------------+--------------------------------------+
| created_at                                 | 2020-04-28T01:22:04.000000           |
| description                                | None                                 |
| id                                         | cb74e550-fa96-4a9c-b685-ecb078966339 |
| name                                       | test_snapshot                        |
| os-extended-snapshot-attributes:progress   | 100%                                 |
| os-extended-snapshot-attributes:project_id | 04d92ef9fe254caaa90d6ecd2849c1cf     |
| properties                                 |                                      |
| size                                       | 5                                    |
| status                                     | available                            |
| updated_at                                 | 2020-04-28T01:22:05.000000           |
| volume_id                                  | 08ed209f-5e7f-465c-b1e1-221b850298db |
+--------------------------------------------+--------------------------------------+

Creating Snapshots

Snapshots are created for network volumes only. You cannot create a snapshot for a local volume.

You can create only one snapshot — a large number of snapshots slows down the performance of the volume.

Creating Snapshots in the Control Panel

To create a snapshot in the Control panel:

  1. Go to the Volumes section in the project;
  2. Select the desired volume and click Make snapshot in its (⋮) context menu or go to the Snapshots tab in the volume card and click Create snapshot

The snapshot name is set automatically in the snap-creationdate_creationtime form, for example: snap-14.05.20_14.43.

Please note that you can also create a snapshot in the Servers section. To do this, click Create snapshot in the (⋮) menu of the desired volume on the Network volumes tab of the server page.

Creating Snapshots through CLI

Learn more about getting started with the OpenStack CLI.

To create a snapshot, run the following:

openstack volume snapshot create --volume <volume> <snapshot name>

Since you can create only one snapshot (the snapshots_per_volume quota is set to 1), you will get the following error message if you try to create more than one snapshot:

SnapshotPerVolumeLimitExceeded: Maximum number of snapshots allowed per volume 08ed209f-5e7f-465c-b1e1-221b850298db (1) exceeded.
Quota: snapshots_per_volume_fast.ru-2b (HTTP 413)

Configuring Snapshots

You can only change the snapshot name.

Configuring Snapshots in the Control Panel

To change the snapshot name in the Control panel:

  1. Go to the Volumes section in the project.
  2. Open the volume card and go to the Snapshots tab.
  3. Expand the (⋮) menu of the snapshot and click Rename.
  4. Enter a new name in the Name field.

Configuring Snapshots through CLI

Learn more about getting started with the OpenStack CLI.

To change the name of the snapshot, run the following:

openstack volume snapshot set --name <new name> <snapshot>

Creating Cloud Servers from Snapshot

To quickly clone a cloud server, you can create a new server from a snapshot. Follow these steps to do this:

  1. Create a new snapshot of the volume or select one of the existing snapshots.
  2. When creating a server, go to the Snapshots tab in the Source field.
  3. Select the required snapshot and complete the server creation.

Deleting Snapshots

A large number of snapshots slows down the performance of the volume. We recommend deleting the snapshot after performing all operations with it.

For long-term storage of the volume state, create a volume from a snapshot.

Deleting Snapshots in the Control Panel

To delete a snapshot in the Control panel:

  1. Go to the Volumes section in the project.
  2. Open the volume card and go to the Snapshots tab.
  3. Expand the (⋮) menu of the snapshot and click Delete.

You can delete all snapshots of one volume at the same time:

Deleting Snapshots through CLI

Learn more about getting started with the OpenStack CLI.

To delete a snapshot, run the following:

openstack volume snapshot delete <snapshot>