gcloud compute disks snapshot DISK_NAME [DISK_NAME …] [--async] [--chain-name=CHAIN_NAME] [--csek-key-file=FILE] [--description=DESCRIPTION] [--guest-flush] [--labels=[KEY=VALUE,…]] [--snapshot-names=SNAPSHOT_NAME,[…]] [--storage-location=LOCATION] [--region=REGION | --zone=ZONE] [GCLOUD_WIDE_FLAG …]
gcloud compute disks snapshot creates snapshots of persistent
disks. Snapshots are useful for backing up data, copying a persistent disk, and
even, creating a custom image. Snapshots can be created from persistent disks
even while they are attached to running instances. Once created, snapshots may
be managed (listed, deleted, etc.) via gcloud compute
snapshots.
Refer to the Snapshot best practices guide. https://cloud.google.com/compute/docs/disks/snapshot-best-practices
gcloud compute disks snapshot waits until the operation returns a status of
READY or FAILED, or reaches the maximum timeout, and
returns the last known details of the snapshot.
compute.disks.createSnapshot,
compute.snapshots.create,
compute.snapshots.get, and
compute.zoneOperations.get.
snapshot-test of a persistent disk named
test in zone us-central1-a, run:
gcloud compute disks snapshot test --zone=us-central1-a --snapshot-names=snapshot-test --description="This is an example snapshot"DISK_NAME [DISK_NAME …]--async--chain-name=CHAIN_NAME--csek-key-file=FILEIf you pass `-` as value of the flag, the CSEK is read from stdin. See https://cloud.google.com/compute/docs/disks/customer-supplied-encryption for more details.
--description=DESCRIPTION--guest-flush--labels=[KEY=VALUE,…]-), underscores (_), lowercase characters, and
numbers. Values must contain only hyphens (-), underscores
(_), lowercase characters, and numbers.
--snapshot-names=SNAPSHOT_NAME,[…]gcloud compute disks snapshot my-disk-1 my-disk-2 my-disk-3 --snapshot-names snapshot-1,snapshot-2,snapshot-3
my-disk-1 being snapshotted as
snapshot-1, my-disk-2 as snapshot-2, and
so on. The name must match the
(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?) regular expression, which
means it must start with an alphabetic character followed by one or more
alphanumeric characters or dashes. The name must not exceed 63 characters and
must not contain special symbols. All characters must be lowercase.
--storage-location=LOCATION--region=REGION
To avoid prompting when this flag is omitted, you can set the
property:
compute/region
gcloud config set compute/region REGIONA list of regions can be fetched by running:
gcloud compute regions listTo unset the property, run:
gcloud config unset compute/regionCLOUDSDK_COMPUTE_REGION.
--zone=ZONEcompute/zone property isn't set, you might
be prompted to select a zone (interactive mode only).
To avoid prompting when this flag is omitted, you can set the
property:
compute/zone
gcloud config set compute/zone ZONEA list of zones can be fetched by running:
gcloud compute zones listTo unset the property, run:
gcloud config unset compute/zoneCLOUDSDK_COMPUTE_ZONE.
--access-token-file,
--account, --billing-project,
--configuration,
--flags-file,
--flatten, --format, --help, --impersonate-service-account,
--log-http,
--project, --quiet, --trace-token, --user-output-enabled,
--verbosity.
Run $ gcloud help for details.
gcloud alpha compute disks snapshotgcloud beta compute disks snapshotgcloud preview compute disks snapshot
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-07-21 UTC.