Snapshots

What is a snapshot in OpenStack/City Cloud?

A snapshot is a mechanism that allows you to create a new image from a running instance. This mainly serves two purposes:

  1. As a backup mechanism:
    Save the main disk of your instance to an image and later boot a new instance from this image with the saved data.
  2. As a templating mechanism:
    Customize a base image and save it to use as a template for new instances.

Snapshots can be taken of instances while they are either running or stopped. In simple terms, snapshots are images with the following additional properties:

NameValue
image_typesnapshot
instance_uuid<uuid of instance that was used for the snapshot>
base_image_ref<uuid of original image of instance that was used for snapshot>
image_locationsnapshot

Live snapshots and data consistency

We call a snapshot taken against a running instance with no downtime a “live snapshot”.

These snapshots are simply disk-only snapshots, and may be inconsistent if the instance’s OS is not aware of the snapshot being taken.

This phenomenon occurs when a hypervisor freezes the instance to allow the creation of a “delta” file before resuming the execution of the instance. This is done to prevent the instance writing directly to its disk while it is copied. When the copy is done, the instance is frozen again to allow the “delta” to be merged with the instance’s disk, and the execution is then resumed with the disk fully merged.

Inconsistencies can appear on the first freeze if the instance is not aware that the hypervisor is taking a snapshot, because the applications and the kernel running on the instance are not told to flush their buffers.

How to make a snapshot in City Cloud using the Control Panel

Add description and pictures.

How to make a snapshot in City Cloud using the API (CLI)

Add description and code blocks (bash commands for the CLI)