Disk snapshots
A snapshot is a snapshot of the state of a network volume, a copy of its file system.
With a snapshot, you can fix the state of the disk without disturbing it so that:
- clone the disk — to do this, you can create a new disk from snapshot or restore data to new disk. You can restore to disk immediately after creating a snapshot;
- clone cloud server — create new cloud server from snapshot;
- change disk type — save the disk state with a snapshot and create the same disk but with a different type.
Working principle
The size of the snapshot may exceed the actual amount of data and files on the disk. The snapshot size includes file system blocks and "dirty data" that appears when files are overwritten or deleted.
Snapshots can only be created for network volumes. A maximum of five snapshots can be created for each disk.
A snapshot is not a backup of a cloud server network volume — it is stored on the same hardware, requires the primary storage to be available for any operation, and is deleted with the disk. If you want to commit the disk state and keep it for a long time, instead of a snapshot, create a backup or create a disk image. If you want to configure automatic backup of a network drive, configure scheduled backups.
You can't download a snapshot, but you can create create disk image and download image.
To see alternative ways to back up cloud servers, see the Backup Methods table.
Cost
Snapshots are paid using cloud platform payment model.
Each GB of snapshots with AVAILABLE or RESTORING statuses is paid. Snapshots in other statuses are not paid.
The cost of a snapshot is equal to the cost of the network volume from which it is created, and depends on disk type. The cost of storing the created snapshot does not change when the disk size changes.
For example, you have a network volume of type Base HDD of size 5 GB and the snapshot size is 1 GB.
A 5 GB disk costs 0.05 ₽ per hour. You pay the same price for a snapshot as for the original disk size (5 GB) — 0.05 ₽ per hour.
If you increase your disk to 7 GB, for example, the snapshot will continue to be charged as before.
Each disk snapshot is paid for, even if there are multiple snapshots.
For example, you have a 5 GB network drive. A 5 GB disk costs 0.05 ₽ per hour. You have created three snapshots, each costing 0.05 ₽ per hour, regardless of the size of the data on disk. You pay 0.15 ₽ per hour for three snapshots.
The actual snapshot size can be viewed in control panel under Cloud Platform → Disks → disk page → Snapshots tab. You can see the total amount of snapshots that are paid for under Cloud Platform → Platform Consumption → Current Cost tab.
The cost per GB of snapshots can be viewed at selectel.ru.
Snapshots created before November 2, 2023 will begin paying on November 2. The size of the snapshot that will be paid for is equal to the size of the disk at the time payment begins.
Create a snapshot
A maximum of five snapshots can be created for each disk. To increase the limit, create a ticket.
- Control panel
- OpenStack CLI
A snapshot can be created for network volumes in AVAILABLE and IN-USE statuses. When a snapshot is created, the name is set automatically as snap-date-created_time-created
, e.g. snap-14.05.21_14.43
.
- In Control Panel, go to Cloud Platform → Disks.
- Open the disk page → Snapshots tab.
- Click Create snapshot.
-
Create a snapshot:
openstack volume snapshot create --volume <volume> <snapshot_name>
Specify:
<volume>
— disk name or ID, the list can be viewed withopenstack volume list
<snapshot_name>
is the name of the snapshot.
Recover data from snapshot
You can create a new network volume from a snapshot. The disk will be a copy of the state that was on the original disk at the time the snapshot was created.
- In Control Panel, go to Cloud Platform → Disks.
- Open the disk page → Snapshots tab.
- From the menu ( ) of the snapshot, select Create disk from snapshot.
- Optional: replace the boot disk on the cloud server with a recovered disk or connect the recovered disk to the server as an additional disk.
Snapshot Statuses
-
In Control Panel, go to Cloud Platform → Disks.
-
Open the disk page → Snapshots tab.
-
Look at the status in the snapshot row → Status column.
Delete snapshot
You can delete the snapshot at delete disk or separately.
- Control panel
- OpenStack CLI
- In Control Panel, go to Cloud Platform → Disks.
- Open the disk page → Snapshots tab.
- From the menu ( ) of the snapshot, select Delete.
-
Delete the snapshot:
openstack volume snapshot delete <snapshot>
Specify
<snapshot>
— the name or ID of the snapshot, can be viewed withopenstack volume snapshot list