Within Cinder, volume snapshots provide a way to non-disruptively copy a volume. This allows for volume backups. It also enables more advanced backup features and provides the ability to boot an instance from a given snapshot or point in time.
In this section, we will show you how to create a snapshot, refresh a snapshot, and delete a given snapshot.
Ensure that you are logged in to the Ubuntu host where the Cinder command-line utilities are installed and source your OpenStack environment admin credentials.
cinder list
command:$ cinder list
Here's the output:
cinder snapshot-create
command:cinder snapshot-create b3e0f6b2-19cb-436f-a190-4b5c66ba2daf
Here's the output:
snapshot-reset-state
command, which produces no output if successful.cinder snapshot-delete
command as follows:cinder snapshot-delete 63c3173b-4f30-4240-99f2-fd2e82cb757e
Confirm whether the volume is deleted with the cinder snapshot-list
command:
cinder snapshot-list
Here's the output:
+----+-----------+--------+--------------+------+ | ID | Volume ID | Status | Display Name | Size | +----+-----------+--------+--------------+------+ +----+-----------+--------+--------------+------+
Cinder volume snapshots provide a flexible way to clone volumes for backup, attaching to other instances and more. The cinder snapshot-
commands we used here—specifically cinder snapshot-create
, cinder snapshot-list
, cinder snapshot-reset-state
, and cinder-snapshot-delete
—instruct Cinder to work with the storage driver to perform snapshot-specific actions: create
, list
, update
, and delete
, respectively. The specific implementation of a particular snapshot depends on the underlying driver.