dcloud ec2 snapshots create

Snapshot a volume

IAM ec2:CreateSnapshotChanges state

Answers 202; poll the snapshot until `state` is `completed`. A helper machine of the platform attaches the volume and copies its raw blocks in 4 MiB chunks to the zone’s snapshot storage; an encrypted volume is copied as LUKS ciphertext, so the helper never holds its key. Unchanged chunks are stored once, so a second snapshot stores only what changed (`newBytes`). An attached volume is refused with 409 unless `stopInstance` is true: the instance is stopped, the volume copied, reattached and the instance started again (needs `ec2:StopInstances` on it).

Synopsis

dcloud ec2 snapshots create id [flags]

Arguments

  • <id>Required

    string

    Also accepted as --id. Constraints: /^vol-[0-9a-f]{6,32}$/

Flags

  • --nameOptional

    string

    A display name; omitted: none

    Constraints: 1-64 chars

  • --descriptionOptional

    string

    Free text; omitted: none

    Constraints: max 255 chars

  • --stop-instanceOptional

    boolean (--stop-instance / --no-stop-instance)

    The volume is attached: stop its instance for the snapshot and start it after

    Default: false

  • --tagsOptional

    map of string

    Tags for the new resource, e.g. {"env": "prod", "project": "shop"}. Keys your organization marks required must be present, or the create is refused with the missing keys (GET /tags/api/keys lists them).

    Constraints: key=value

Example

dcloud ec2 snapshots create id

Generated from the API description, the same one the API checks requests against and the CLI is built from.