Create a volume snapshot
Create volume snapshots to preserve volume state at a specific point in time. Snapshots are useful for creating backups before changes, cloning volumes with existing data, or restoring volumes if problems occur. For in-use volumes, use the --force option.
Before you begin Copy linkLink copied!
- A volume that you want to snapshot. For more information about creating volumes, see Create a block storage volume.
About this task Copy linkLink copied!
By default, the maximum number of snapshots you can create for a project is 10. However, the project administrator can change this limit for your project.
Volume backups are different from snapshots. Backups preserve the data contained in the volume, whereas snapshots preserve the state of a volume at a specific point in time. You cannot delete a volume if it has existing snapshots. Volume backups prevent data loss, whereas snapshots facilitate cloning.
For this reason, snapshot back ends are typically colocated with volume back ends to minimize latency during cloning. By contrast, a backup repository is usually located in a different location, for example, on a different node, physical storage, or even geographical location in a typical enterprise deployment. This is to protect the backup repository from any damage that might occur to the volume back end.
Procedure Copy linkLink copied!
Revert a volume to a snapshot Copy linkLink copied!
Revert a volume to its most recent snapshot by modifying the existing volume rather than creating a new volume. This approach is faster and more efficient for undoing recent changes or recovering from errors.
Before you begin Copy linkLink copied!
- Block Storage service (cinder) REST API microversion 3.40 or later.
- You must have created at least one snapshot for the volume.
About this task Copy linkLink copied!
- Limitations
-
- You cannot use the revert-to-snapshot feature on an attached or in-use volume.
- You cannot use the revert-to-snapshot feature on a bootable root volume because it is not in the available state. To use this feature, the instance must have been booted with the
delete_on_termination=false(default) property to preserve the boot volume if the instance is terminated. When you want to revert to a snapshot, you must first delete the initial instance so that the volume is available. You can then revert it and create a new instance from the volume. - You cannot revert a volume that you resize (extend) after taking the snapshot.
- There might be limitations to using the revert-to-snapshot feature with multi-attach volumes. Check whether such limitations apply before you use this feature.
For information about which features your drivers support, contact your driver vendors.
Procedure Copy linkLink copied!
Delete a volume snapshot Copy linkLink copied!
You can delete volume snapshots that you no longer need to free up storage space and avoid exceeding your project’s snapshot quota limit. Removing unused snapshots helps you stay within quota limits and maintain capacity for creating new snapshots.
Before you begin Copy linkLink copied!
- A volume snapshot that you want to delete.
About this task Copy linkLink copied!
Red Hat OpenStack Services on OpenShift (RHOSO) 18.0 uses the RBD CloneV2 API. When you use Red Hat Ceph Storage as a back end, you can delete volume snapshots even if they have dependencies. If you use an external Ceph Storage back end, you must configure the minimum client on the Ceph Storage cluster. For more information, see Enable deferred deletion for volumes or images with dependencies.