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 beginSelect the tab for how you plan to use the samples on this page:
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 optionsWhen 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:
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.
us-central1
, then the default storage location is the multi-region us
.australia-southeast1
, the default location becomes the asia
multi-region.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 settingsYou 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 taskTo perform this task, you must have the following permissions:
compute.snapshotSettings.update
on the projectTo 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:
PROJECT_ID
: The ID of the project.STORAGE_LOCATION
: The snapshot storage location policy for your project. The value can be one of the following:
nearest-multi-region
: Specifies the location policy as the closest Cloud Storage multi-region to the location of your disk.local-region
: Specifies the location policy as the same Cloud Storage region where your disk is located.specific-locations
: Specifies the location policy as a custom Cloud Storage region location of your choice. If you specify this option, you must also specify the location that you want by using the --storage-location-names
flag.REGION_NAME
: Optional: If you include the --storage-location-policy
flag with a value of specific-locations
, then you must specify a Cloud Storage region. You can specify only one region and it can't be a Cloud Storage multi-region. Set this value to the name of the region that you want to specify as your storage location policy.
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
us-central1
), use the --storage-location-names
flag and run the following command:gcloud compute snapshot-settings update \ --project=my-project \ --storage-location-policy=specific-locations \ --storage-location-names=us-central1REST
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:
PROJECT_ID
: The ID of the project.STORAGE_LOCATION
: The snapshot storage location policy for your project. The value can be one of the following:
NEAREST_MULTI_REGION
: Specifies the location policy as the closest Cloud Storage multi-region to the location of your disk.LOCAL_REGION
: Specifies the location policy as the same Cloud Storage region where your disk is located.SPECIFIC_LOCATIONS
: Specifies the location policy as a custom Cloud Storage region location of your choice. If you specify this option, you must also specify the location that you want by using the locations
parameter in your request.REGION_NAME
: Optional: If you include the policy
parameter with a value of SPECIFIC_LOCATIONS
, then you must specify a Cloud Storage region. You can specify only one region and it can't be a Cloud Storage multi-region. Set this value to the name of the region that you want to specify as your storage location policy.
Consider an example project my-project
in us-central1
region.
PATCH
request:PATCH https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/global/snapshotSettings { "storageLocation": { "policy": "NEAREST_MULTI_REGION" } }
PATCH
request:PATCH https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/global/snapshotSettings { "storageLocation": { "policy": "LOCAL_REGION" } }
us-central1
), make the following PATCH
request: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 taskTo perform this task, you must have the following permissions:
compute.snapshotSettings.get
on the projectTo 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.
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.
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."],[[["Snapshot settings allow users to customize the default storage location for their project's snapshots, eliminating the need to specify a location every time a snapshot is created."],["You can customize snapshot storage locations to be the nearest multi-region, the same local region as the source disk, or specific regions of your choice, with the exception that you cannot customize instant snapshots."],["Modifying snapshot settings only affects snapshots created after the change, and manually specifying a location during snapshot creation overrides the project's defined snapshot settings."],["Google Cloud has a predefined storage location policy for snapshots, which defaults to the geographically closest multi-region to the source disk if no custom settings are configured."],["You can use either the `gcloud CLI` or `REST API` to update or view snapshot settings for a project."]]],[]]
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