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 bydefault. For a given project, you can customize the default location whereGoogle Cloud stores the globally scoped snapshots by configuring your snapshot settings.Using snapshot settings to define your own custom default removes the need foryou to manually specify a location every time you create a snapshot.
This document provides information about snapshot settings and how to use themto customize the default storage location for your project's globally scopedsnapshots.
To manage location settings for regionally scoped snapshots, seeSet snapshot creation and restore locations for regionally scoped snapshots(Preview).
Before you begin
- If you haven't already, set upauthentication. Authentication verifies your identity for access to Google Cloud services and APIs. To run code or samples from a local development environment, you can authenticate to Compute Engine by selecting one of the following options:
Select the tab for how you plan to use the samples on this page:
gcloud
Install the Google Cloud CLI. After installation,initialize the Google Cloud CLI by running the following command:
gcloudinit
If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.
Note: If you installed the gcloud CLI previously, make sure you have the latest version by runninggcloud components update.- Set a default region and zone.
REST
To use the REST API samples on this page in a local development environment, you use the credentials you provide to the gcloud CLI.
Install the Google Cloud CLI. After installation,initialize the Google Cloud CLI by running the following command:
gcloudinit
If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.
Note: If you installed the gcloud CLI previously, make sure you have the latest version by runninggcloud components update.For more information, seeAuthenticate for using REST in the Google Cloud authentication documentation.
Limitations
- You can view and update the snapshot settings only by using thegcloud CLI or REST.
- You can't customize the default storage location of instant snapshots. You canonly do so for standard and archive snapshots.
- Modifying the location policy in your project's snapshot settings only affectsthe snapshots that are created after that modification. Updating yourproject's snapshot settings does not change the location of any existingsnapshots.
- If you manually specify a location during snapshot creation, then Google Cloudoverrides the snapshot settings and creates your snapshot in that newlyspecified location. However, the storage location policy in your snapshotsettings remains unchanged.
- Default storage locations apply only to globally scoped snapshots. To controlstorage locations for regionally scoped snapshots, you mustSet allowed snapshot creation locations.
- Setting a default storage location controls only where the snapshot is stored.With globally scoped snapshots, you can't set where snapshot data can berestored. To set allowed locations for snapshot restoration, you need tocreate a regional snapshotandset allowed restore locations.
How snapshot settings work
The storage location policy of a project's snapshot settings defines whereGoogle Cloud automatically stores that project's snapshots. Google Cloudmaintains apredefined value for this storage location policyuntil 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 thatproject.
You can update your snapshot settings to modify the storage location policy anynumber of times. However, modifying your project's snapshot settings onlyaffects the locations of snapshots that are created after that modification.Updating your project's snapshot settings does not change the location of anyexisting snapshots.
To ensure that Google Cloud uses the storage location defined by your snapshotsettings, don't manually specify a location during snapshot creation. If youmanually specify a location during snapshot creation, then Google Cloudoverrides the snapshot settings and creates your snapshot in that newlyspecified location. However, the storage location policy in your snapshotsettings remains unchanged.
You can use snapshot settings to customize the default storage location ofyour standard and archive snapshots. You can't customize the default storagelocation ofinstant snapshots.
Storage location options
When you configure your project's snapshot settings and specify a new defaultstorage location, you can either choose specific regions or use disk-basedlocation settings. More specifically, you can choose one of the followinglocation options for your storage location policy:
- The nearest multi-region to the source disk
- The same local region as the source disk
- Specific regions of your choice
Google Cloud predefined storage location policy
Until you update your snapshot settings for the first time, Google Cloudmaintains a predefined value for the storage location policy. This predefinedpolicy provides the default storage location for snapshots until you configureyour own default storage location by updating your project's snapshot settings.The predefined storage location policy is set to themulti-regionthat is geographically closest to the location of your source disk.
- If your source disk is in a location that is part of a multi-region, thenyour snapshot settings storage location policy is set to that multi-region.For example, if your disk is in a location like
us-central1, thenthe default storage location is the multi-regionus. - For a location that is outside of a multi-region, the default storagelocation is the geographically closest multi-region outside of that region.For a location like
australia-southeast1, the default location becomes theasiamulti-region.
Pricing implications
You don't have to pay any extra amount to use snapshot settings for yourprojects. However, the location values that you specify using snapshot settingsaffect 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 storagelocation 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 theGoogle Cloud predefined storage location policy.
Permissions required for this task
To perform this task, you must have the followingpermissions:
compute.snapshotSettings.updateon the project
gcloud
To add the snapshot settings or update the existing snapshot settings for yourproject, use thegcloud 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 locationpolicy for your project. The value can be one of the following:nearest-multi-region: Specifies the location policy as the closestCloud Storage multi-regionto the location of your disk.local-region: Specifies the location policy as the sameCloud Storage regionwhere your disk is located.specific-locations: Specifies the location policy as a customCloud Storage regionlocation of your choice. If you specify this option, you must alsospecify the location that you want by using the--storage-location-namesflag.
REGION_NAME: Optional: If you include the--storage-location-policyflag with a value ofspecific-locations, thenyou must specify aCloud Storage region.You can specify only one region and it can't be a Cloud Storagemulti-region. Set this value to the name of the region that you want tospecify as your storage location policy.
Examples to set storage location policy using snapshot settings
Consider an example projectmy-project inus-central1 region.
- To configure the storage location policy of your project's snapshotsettings as the Cloud Storage multi-region closest to your disk,run the following command:
gcloud compute snapshot-settings update \ --project=my-project \ --storage-location-policy=nearest-multi-region
- To configure the storage location policy of your project's snapshotsettings as the same Cloud Storage region as your disk,run the following command:
gcloud compute snapshot-settings update \ --project=my-project \ --storage-location-policy=local-region
- To configure as the storage location policy of your project's snapshotsettings as a specific location of your choice (like
us-central1),use the--storage-location-namesflag and run the following command:
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 yourproject, make aPATCH request to thesnapshotSettings.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 policyfor your project. The value can be one of the following:NEAREST_MULTI_REGION: Specifies the location policy as the closestCloud Storage multi-regionto the location of your disk.LOCAL_REGION: Specifies the location policy as the sameCloud Storage regionwhere your disk is located.SPECIFIC_LOCATIONS: Specifies the location policy as a customCloud Storage regionlocation of your choice. If you specify this option, you must alsospecify the location that you want by using thelocationsparameterin your request.
REGION_NAME: Optional: If you include thepolicyparameter with a value ofSPECIFIC_LOCATIONS, then you mustspecify aCloud Storage region.You can specify only one region and it can't be a Cloud Storagemulti-region. Set this value to the name of the region that you want tospecify as your storage location policy.
Examples to set storage location policy using snapshot settings
Consider an example projectmy-project inus-central1 region.
- To configure the storage location policy of your project's snapshot settingsas the Cloud Storage multi-region closest to your disk, make thefollowing
PATCHrequest:
PATCH https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/global/snapshotSettings { "storageLocation": { "policy": "NEAREST_MULTI_REGION" } }- To configure the storage location policy of your project's snapshot settingsas the same Cloud Storage region as your disk, make the following
PATCHrequest:
PATCH https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/global/snapshotSettings { "storageLocation": { "policy": "LOCAL_REGION" } }- To configure as the storage location policy of your project's snapshotsettings as a specific location (like
us-central1), make the followingPATCHrequest:
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 theCompute Engine API and the gcloud CLI.
Permissions required for this task
To perform this task, you must have the followingpermissions:
compute.snapshotSettings.geton the project
gcloud
To view the snapshot settings for your project, use thegcloud compute snapshot-settings describe command:
gcloud compute snapshot-settings describe \ --project=PROJECT_ID
ReplacePROJECT_ID with the ID of the project.
REST
To view the snapshot settings for your project, make aGET request to thesnapshotSettings.get method:
GET https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/global/snapshotSettings
ReplacePROJECT_ID with the ID of the project.
What's next
- Learn how toview, delete, and share disk snapshots.
- Learn how tocreate scheduled snapshots for disks.
- Learn how tocreate a disk image from your snapshot.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-02-18 UTC.