Container Snapshot

For container workloads that have one or more persistent volumes attached, Crafting supports snapshotting those volumes. A container snapshot captures all persistent volumes of a container workload at once.

Note: The root filesystem of a container workload does not support snapshotting, even if volatile: true is not specified in the container definition. Only persistent volumes can be snapshotted.

A container snapshot can only be restored to container workloads that have the same volume names in the same order as when the snapshot was created.

Creating a Snapshot

Create a container snapshot using the snapshot button in the Web UI, or using the CLI:

cs snapshot create -W SANDBOX/WORKLOAD NAME

Where:

During snapshot creation, the container workload is temporarily stopped and resumed when creation is complete.

Container snapshots are shared across the org and can be used by any template or sandbox with matching attached volume names and order.

Using a Snapshot

In a Template

Reference a container snapshot in a template definition so new sandboxes have the data ready when they start:

containers:
- name: example
  image: example:tag
  snapshot: NAME

Restoring to an Existing Sandbox

For a running container workload, restore a snapshot using the restore button in the Web UI, or using the CLI:

cs snapshot restore -W SANDBOX/WORKLOAD NAME

Where SANDBOX/WORKLOAD is the same as in the create command, and NAME is the snapshot name to restore.

During restoration, the container workload is temporarily stopped and resumed when restoration is complete.

See Also