Instance snapshots CLI reference
See the OpenStack CLI reference for the full command set.
These commands create, list, show, and delete instance snapshots, and create new instances from existing snapshots.
Create an instance snapshot#
bash
openstack server image create --name SNAPSHOT_NAME SERVER_ID_OR_NAMESNAPSHOT_NAME: Name of the snapshot.SERVER_ID_OR_NAME: ID or name of the instance to snapshot.
List snapshots (images)#
bash
openstack image list- Lists all images, including snapshots. Identify snapshots by their names or other metadata.
Show snapshot details#
bash
openstack image show SNAPSHOT_ID_OR_NAMESNAPSHOT_ID_OR_NAME: ID or name of the snapshot.
List the underlying volume snapshot#
bash
# Show the Glance image entry. Its block_device_mapping property
# records the backing snapshot_id.
openstack image show SNAPSHOT_NAME
# Show the Cinder volume snapshot that holds the data. Match it by
# the snapshot_id from the image, or by its description.
openstack volume snapshot listDelete a snapshot#
bash
openstack image delete SNAPSHOT_ID_OR_NAME
openstack volume snapshot delete VOLUME_SNAPSHOT_IDopenstack image deleteremoves the Glance image.openstack volume snapshot deleteremoves the backing Cinder volume snapshot. The image delete does not remove it, so run this step to reclaim storage and free thesnapshots_VOLUME_TYPEquota.
Create an instance from a snapshot#
bash
openstack server create --image SNAPSHOT_ID_OR_NAME --flavor FLAVOR_ID_OR_NAME NEW_SERVER_NAMESNAPSHOT_ID_OR_NAME: ID or name of the snapshot to use as the image.FLAVOR_ID_OR_NAME: ID or name of the flavor for the new instance.NEW_SERVER_NAME: Name of the new instance.
The snapshot image references a volume snapshot, so this command clones that snapshot into a new Cinder volume and boots the instance from the cloned volume.