Taking an instance snapshot can be useful if you want to keep a certain version of an instance.
For example: to relaunch an instance from a previous version or migrate an instance to another project.
Before taking a snapshot, please make sure the instance is stopped.
If instance is up, data are not guaranteed to be flushed to disk.
Taking snapshot by using
$ openstack server image create <instance> --name myInstanceSnapshot
This creates an image named myInstanceSnapshot.
$ openstack image list
+------------+---------------------------------+--------+
| ID | Name | Status |
+------------+---------------------------------+--------+
| id-image-1 | cirros-0.3.5-x86_64-uec | active |
| id-image-2 | cirros-0.3.5-x86_64-uec-kernel | active |
| id-image-3 | cirros-0.3.5-x86_64-uec-ramdisk | active |
| id-image-4 | myInstanceSnapshot | active |
+------------+---------------------------------+--------+
You can launch a new instance using a snapshot for the image parameter.
$ openstack server create --flavor <flavor> --image <snapshot> <instance>
Migrate an instance to another OpenStack project requires three steps:
To learn more about snapshots, please refer to the OpenStack documentation page.
OpenStack documentation