Snapshotting an instance
Snapshotting an instance will create a Glance image of the instance at the point in time the snapshot was taken. This image can then be used to deploy additional instances of a given application, or as a bootable backup of the instance.
Getting ready
In order to create a snapshot of an instance, you require the following information:
The
openstack
command-line clientThe
openrc
file containing appropriate credentialsThe name of the instance
How to do it…
The following commands are used to create an instance snapshot:
First, we list the existing images with the following command:
openstack image list -c Name -c Status
This will bring back a list of images like the following:
Now list the running instances with the following command:
openstack server list -c Name -c Status
This gives an output like the following:
To create the snapshot, issue the following command (note the optional shell expansion command we're using to timestamp the name of the snapshot):
openstack server...