A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://cloud.google.com/compute/docs/disks/create-snapshots below:

Create archive and standard disk snapshots | Compute Engine Documentation

Skip to main content Create archive and standard disk snapshots

Stay organized with collections Save and categorize content based on your preferences.

Create standard snapshots to periodically back up data from zonal and regional Persistent Disk and Google Cloud Hyperdisk volumes.

You can create snapshots from disks even while they are attached to running instances. Snapshots are, by default, global resources, so you can use them to restore data to a new disk or VM within the same project. For additional data protection and cost management, you can control where you can use your snapshots to create new disks. To restrict the regions where your snapshots can restore data, you can create a regionally scoped snapshot and set allowed access locations (Preview). You can also share snapshots across projects.

Before you begin Required roles and permissions

To get the permissions that you need to create a standard snapshot, ask your administrator to grant you the following IAM roles on the project:

For more information about granting roles, see Manage access to projects, folders, and organizations.

These predefined roles contain the permissions required to create a standard snapshot. To see the exact permissions that are required, expand the Required permissions section:

Required permissions

The following permissions are required to create a standard snapshot:

You might also be able to get these permissions with custom roles or other predefined roles.

Prepare for creating snapshots

To prepare for creating snapshots of Persistent Disk or Hyperdisk volumes, do the following:

Important: If you pause your applications before creating a snapshot, resume your workloads only after the snapshot resource reaches the UPLOADING status. For more information, see the table in Manually creating application consistent snapshots. Create a snapshot of Persistent Disk or Hyperdisk volume

The steps to create a snapshot of a disk depend on whether you're creating a snapshot of a zonal disk or regional disk.

Caution: If you try to create a snapshot from a disk and the snapshot creation process fails, you won't be able to delete the original disk volume until you clean up the failed snapshot and capture a clean snapshot. This failsafe helps to prevent the accidental deletion of source data in the event of an unsuccessful backup. Create a snapshot of a zonal disk Console
  1. Go to the Create a Snapshot page in the Google Cloud console.

    Go to the Create a Snapshot page
  2. Enter a snapshot Name.
  3. Select a Snapshot type. The default is a STANDARD snapshot, which is the best option for long-term back up and disaster recovery.

    Choose Archive snapshot for more cost-efficient data retention.

  4. Optional: Enter a Description of the snapshot.
  5. Under Source disk, select the existing disk that you want to create a snapshot of.
  6. In the Location section, choose your snapshot storage location.

    The predefined or customized default location defined in your snapshot settings is automatically selected. Optionally, you can override the snapshot settings and store your snapshots in a custom storage location by doing the following:

    1. Choose the type of storage location that you want for your snapshot.

      • Choose Multi-regional for higher availability at a higher cost.
      • Choose Regional snapshots for more control over the physical location of your data at a lower cost.
    2. In the Select location field, select the specific region or multi-region that you want to use. To use the region or multi-region that is closest to your source disk, select Based on disk's location.
  7. Click Create to create the snapshot.
gcloud

You can create your snapshot in the storage location policy defined by your snapshot settings or using an alternative storage location of your choice. For more information, see Choose your snapshot storage location.

Replace the following:

Note: Google recommends using the gcloud compute snapshots create command instead of the gcloud compute disks snapshot command because it supports more features, such as creating snapshots in a project different from the source disk project. Terraform

To create a snapshot of the zonal Persistent Disk volume, use the google_compute_snapshot resource.

To learn how to apply or remove a Terraform configuration, see Basic Terraform commands.

Go Go

Before trying this sample, follow the Go setup instructions in the Compute Engine quickstart using client libraries. For more information, see the Compute Engine Go API reference documentation.

To authenticate to Compute Engine, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.

Java Java

Before trying this sample, follow the Java setup instructions in the Compute Engine quickstart using client libraries. For more information, see the Compute Engine Java API reference documentation.

To authenticate to Compute Engine, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.

Node.js Node.js

Before trying this sample, follow the Node.js setup instructions in the Compute Engine quickstart using client libraries. For more information, see the Compute Engine Node.js API reference documentation.

To authenticate to Compute Engine, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.

Python Python

Before trying this sample, follow the Python setup instructions in the Compute Engine quickstart using client libraries. For more information, see the Compute Engine Python API reference documentation.

To authenticate to Compute Engine, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.

REST

You can create your snapshot in the storage location policy defined by your snapshot settings or using an alternative storage location of your choice. For more information, see Choose your snapshot storage location.

Replace the following:

Note: Google recommends using the snapshots.insert method instead of the disks.createSnapshot method because it supports more features, such as creating snapshots in a project different from the source disk project. Create a snapshot of a regional disk

You can create snapshots of your regional disk in one of the following ways:

Important: Google recommends that you use the checkpoint to create standard snapshots only when your degraded replicated disk doesn't have a synced replica available. To avoid data loss, if your degraded disk has a synced replica available, always use the data on the disk to create your snapshot.

After you prepare the disk, you can create a snapshot. When creating a snapshot of a regional disk, you must indicate the region where the source disk is located.

Console
  1. Go to the Create a Snapshot page in the Google Cloud console.

    Go to the Create a Snapshot page
  2. Enter a snapshot Name.
  3. Select a Snapshot type. The default is a STANDARD snapshot, which is the best option for long-term back up and disaster recovery.

    Choose Archive snapshot for more cost-efficient data retention.

  4. Optional: Enter a Description of the snapshot.
  5. Under Source disk, select the existing disk that you want to create a snapshot of.
  6. In the Location section, choose your snapshot storage location.

    The predefined or customized default location defined in your snapshot settings is automatically selected. Optionally, you can override the snapshot settings and store your snapshots in a custom storage location by doing the following:

    1. Choose the type of storage location that you want for your snapshot.

      • Choose Multi-regional for higher availability at a higher cost.
      • Choose Regional snapshots for more control over the physical location of your data at a lower cost.
    2. In the Select location field, select the specific region or multi-region that you want to use. To use the region or multi-region that is closest to your source disk, select Based on disk's location.
  7. Click Create to create the snapshot.
gcloud

You can create a snapshot either by using the source disk's data or its replica recovery checkpoint.

From disk data

You can create a snapshot from your disk's data using the storage location policy defined by your snapshot settings or using an alternative storage location of your choice. For more information, see Choose your snapshot storage location.

Replace the following:

Note: Google recommends using the gcloud compute snapshots create command instead of the gcloud compute disks snapshot command because it supports more features, such as creating snapshots in a project different from the source disk project. From checkpoint

You can create your snapshot using the replica recovery checkpoint of a degraded disk. Your snapshot gets created as long as your incomplete replica is available.

To create a snapshot using the replica recovery checkpoint, use the gcloud compute snapshots create command . Include the --source-disk-for-recovery-checkpoint flag to specify that you want to create the snapshot using a replica recovery checkpoint. Exclude the --source-disk and --source-disk-region parameters.

gcloud compute snapshots create SNAPSHOT_NAME \
    --source-disk-for-recovery-checkpoint=SOURCE_DISK \
    --source-disk-for-recovery-checkpoint-region=SOURCE_REGION \
    --storage-location=STORAGE_LOCATION \
    --snapshot-type=SNAPSHOT_TYPE

Replace the following:

You can use replica recovery checkpoint to create a snapshot only on degraded disks. If you try to create a snapshot from a replica recovery checkpoint when the device is fully replicated, you see the following error message:

The device is fully replicated and should not create snapshots out of a recovery checkpoint. Please
create regular snapshots instead.

The Google Cloud CLI waits until the operation returns a status of READY, FAILED, or reaches the maximum timeout and returns the last known details of the snapshot.

Terraform

The Terraform provider for Google Cloud doesn't support creating a snapshot of a regional disk. To track this limitation, see the issue on GitHub.

Go Go

Before trying this sample, follow the Go setup instructions in the Compute Engine quickstart using client libraries. For more information, see the Compute Engine Go API reference documentation.

To authenticate to Compute Engine, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.

Java Java

Before trying this sample, follow the Java setup instructions in the Compute Engine quickstart using client libraries. For more information, see the Compute Engine Java API reference documentation.

To authenticate to Compute Engine, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.

Node.js Node.js

Before trying this sample, follow the Node.js setup instructions in the Compute Engine quickstart using client libraries. For more information, see the Compute Engine Node.js API reference documentation.

To authenticate to Compute Engine, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.

Python Python

Before trying this sample, follow the Python setup instructions in the Compute Engine quickstart using client libraries. For more information, see the Compute Engine Python API reference documentation.

To authenticate to Compute Engine, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.

REST

You can create a snapshot either by using the source disk's data or its replica recovery checkpoint.

From disk data

You can create a snapshot from your disk's data using the storage location policy defined by your snapshot settings or using an alternative storage location of your choice. For more information, see Choose your snapshot storage location.

Replace the following:

Note: Google recommends using the snapshots.insert method instead of the disks.createSnapshot method because it supports more features, such as creating snapshots in a project different from the source disk project. From checkpoint

Alternatively, you can create your snapshot using the replica recovery checkpoint of a degraded disk. Your snapshot gets created as long as your incomplete replica is available.

To create a snapshot using the replica recovery checkpoint, make a POST request to the snapshots.insert method. Exclude the sourceDisk parameter and instead include the sourceDiskForRecoveryCheckpoint parameter to specify that you want to create the snapshot using the checkpoint.

POST https://compute.googleapis.com/compute/v1/projects/DESTINATION_PROJECT_ID/global/snapshots

{
  "name": "SNAPSHOT_NAME",
  "sourceDiskForRecoveryCheckpoint": "projects/SOURCE_PROJECT_ID/regions/SOURCE_REGION/disks/SOURCE_DISK_NAME",
  "storageLocations": "STORAGE_LOCATION",
  "snapshotType": "SNAPSHOT_TYPE"
}

Replace the following:

You can use replica recovery checkpoint to create a snapshot only on degraded disks. If you try to create a snapshot from a replica recovery checkpoint when the device is fully replicated, you see the following error message:

The device is fully replicated and should not create snapshots out of a recovery checkpoint. Please
create regular snapshots instead.
What's next

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 2025-08-07 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["Snapshots provide a way to back up data from Zonal Persistent Disk, Regional Persistent Disk, and Google Cloud Hyperdisk volumes, even while they are attached to running instances."],["Snapshots are global resources, meaning they can be used to restore data to a new disk or VM within the same project, and can also be shared across different projects."],["To create a snapshot, users must have specific IAM roles and permissions, such as Compute Instance Admin (v1) and Service Account User (v1), and depending on disk type, can utilize different create methods."],["Before creating snapshots, it's important to review best practices, consider customizing the default storage location, and learn about creating snapshot schedules for regular backups."],["Snapshots can be created using the Console, `gcloud` CLI, Terraform, or REST API, with the option to store them in a predefined default location or a custom storage location."]]],[]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4