Using image snapshots
In OpenStack, a snapshot is an image that reflects the state of an instance at a point in time. Snapshots are often used to backup instances or migrate instances from one cloud to another, and can even be shared with other projects like regular images.
Creating snapshots
Snapshots in OpenStack can be created using the openstack server image create
command.
Getting ready
When creating a snapshot, ensure that you are authenticated as an administrator or are the owner of the instance. You will need the following details:
Instance name or ID
Image name
For our example, the following will be used:
Instance name:
COOKBOOK_TEST_INSTANCE
Image:
COOKBOOK_TEST_SNAPSHOT_20170824
How to do it…
With the OpenStack client installed on our system, we are now able to create a snapshot with the following command:
openstack server image create \ --name COOKBOOK_TEST_SNAPSHOT_20171016 \ COOKBOOK_TEST_INSTANCE
The output will resemble the following:
How it works…
Images snapshots are created with...