[ Web Proxy ]
URL:
Viewing: https://cloud.google.com/compute/docs/disks/snapshot-settings [Back]  [Original]

Set default storage locations for globally scoped snapshots  |  Compute Engine  |  Google Cloud Documentation Skip to main content
Google Cloud Documentation [Google Cloud Documentation]
Send feedback

Set default storage locations for globally scoped snapshots Stay organized with collections Save and categorize content based on your preferences.

When you create snapshots, they are created as globally scoped snapshots by default. For a given project, you can customize the default location where Google Cloud stores the globally scoped snapshots by configuring your snapshot settings. Using snapshot settings to define your own custom default removes the need for you to manually specify a location every time you create a snapshot.

This document provides information about snapshot settings and how to use them to customize the default storage location for your project's globally scoped snapshots.

To manage location settings for regionally scoped snapshots, see Set snapshot creation and restore locations for regionally scoped snapshots (Preview).

Before you begin

Limitations

How snapshot settings work

The storage location policy of a project's snapshot settings defines where Google Cloud automatically stores that project's snapshots. Google Cloud maintains a predefined value for this storage location policy until you update the snapshot settings and configure a new default. After you update the snapshot settings and set a new default storage location, Google Cloud uses this location to store every new snapshot created in that project.

You can update your snapshot settings to modify the storage location policy any number of times. However, modifying your project's snapshot settings only affects the locations of snapshots that are created after that modification. Updating your project's snapshot settings does not change the location of any existing snapshots.

To ensure that Google Cloud uses the storage location defined by your snapshot settings, don't manually specify a location during snapshot creation. If you manually specify a location during snapshot creation, then Google Cloud overrides the snapshot settings and creates your snapshot in that newly specified location. However, the storage location policy in your snapshot settings remains unchanged.

You can use snapshot settings to customize the default storage location of your standard and archive snapshots. You can't customize the default storage location of instant snapshots.

Storage location options

When you configure your project's snapshot settings and specify a new default storage location, you can either choose specific regions or use disk-based location settings. More specifically, you can choose one of the following location options for your storage location policy:

Google Cloud predefined storage location policy

Until you update your snapshot settings for the first time, Google Cloud maintains a predefined value for the storage location policy. This predefined policy provides the default storage location for snapshots until you configure your own default storage location by updating your project's snapshot settings. The predefined storage location policy is set to the multi-region that is geographically closest to the location of your source disk.

Pricing implications

You don't have to pay any extra amount to use snapshot settings for your projects. However, the location values that you specify using snapshot settings affect other operations, which may in turn affect those operational costs.

Set the default storage location for a project using snapshot settings

You can update your project's snapshot settings and set a new default storage location by using REST and the gcloud CLI.

If you don't set a storage location policy in your snapshot settings, then your snapshots are created using the Google Cloud predefined storage location policy.

Permissions required for this task

To perform this task, you must have the following permissions:

gcloud

To add the snapshot settings or update the existing snapshot settings for your project, use the gcloud compute snapshot-settings update command:

  gcloud compute snapshot-settings update \
      --project=PROJECT_ID \
      --storage-location-policy=STORAGE_LOCATION \
      --storage-location-names=REGION_NAME

Replace the following:

Examples to set storage location policy using snapshot settings

Consider an example project my-project in us-central1 region.

  gcloud compute snapshot-settings update \
      --project=my-project \
      --storage-location-policy=nearest-multi-region
  gcloud compute snapshot-settings update \
      --project=my-project \
      --storage-location-policy=local-region
  gcloud compute snapshot-settings update \
      --project=my-project \
      --storage-location-policy=specific-locations \
      --storage-location-names=us-central1

REST

To add the snapshot settings or update existing the snapshot settings for your project, make a PATCH request to the snapshotSettings.update method:

  PATCH https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/global/snapshotSettings

  {
    "storageLocation": {
      "policy": "STORAGE_LOCATION",
      "locations": {
            "REGION_NAME": { "name": "REGION_NAME" }
      }
    }
  }

Replace the following:

Examples to set storage location policy using snapshot settings

Consider an example project my-project in us-central1 region.

    PATCH https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/global/snapshotSettings

    {
      "storageLocation": {
        "policy": "NEAREST_MULTI_REGION"
      }
    }
    PATCH https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/global/snapshotSettings

    {
      "storageLocation": {
        "policy": "LOCAL_REGION"
      }
    }
    PATCH https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/global/snapshotSettings

    {
      "storageLocation": {
        "policy": "SPECIFIC_LOCATIONS",
        "locations": {
          "us-central1": { "name": "us-central1"}
        }
      }
    }

View the default storage location defined by a project's snapshot settings

You can view your project's snapshot settings by using the Compute Engine API and the gcloud CLI.

Permissions required for this task

To perform this task, you must have the following permissions:

gcloud

To view the snapshot settings for your project, use the gcloud compute snapshot-settings describe command:

  gcloud compute snapshot-settings describe \
      --project=PROJECT_ID

Replace PROJECT_ID with the ID of the project.

REST

To view the snapshot settings for your project, make a GET request to the snapshotSettings.get method:

  GET https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/global/snapshotSettings

Replace PROJECT_ID with the ID of the project.

What's next

Send feedback

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-08-11 UTC.

Need to tell us more? [[["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 2026-08-11 UTC."],[],[]]

Web Proxy Viewer  |  New URL  |  Original Page