Configure the default backup setting for the console Stay organized with collections Save and categorize content based on your preferences.
This page explains how to choose, view, and change the option for a project'sdefault backup setting. This page might also help you choose which backupsetting you want to select when creating an instance.
When you create a Compute Engine instance in the Google Cloud console, you canspecify the method that you want to use to back up your data. Thedefault backup setting is a project-wide Compute Engine setting thatspecifies which method is preselected by default when you create an instance inthe Google Cloud console. For example, you can configure the default backup settingto help encourage a project to use your preferred method for automaticallybacking up data.
Before you begin
To learn about the options that you can use to back up data, seeData protection options. Specifically, this page discusses options for automatically scheduled backups, especiallybackup plans for backup vaults andsnapshot schedules.
Pricing
Some of the backup options incur additional costs when you create an instance.For more information, see the pricing for each option inUnderstand and choose the default backup settingin this document.
Required roles
To get the permissions that you need to choose, view, and change the default backup setting, ask your administrator to grant you the following IAM roles on your project:
- View and change the default backup setting:Compute Instance Admin (v1) (
roles/compute.instanceAdmin.v1) - If you want to use backup plans and need to enable the Backup and DR API:Service Usage Admin (
roles/serviceusage.serviceUsageAdmin)
For more information about granting roles, seeManage access to projects, folders, and organizations.
These predefined roles contain the permissions required to choose, view, and change the default backup setting. To see the exact permissions that are required, expand theRequired permissions section:
Required permissions
The following permissions are required to choose, view, and change the default backup setting:
- View and change the Compute Engine settings and metadata for the project:
compute.projects.setCommonInstanceMetadatacompute.projects.get
- Enable APIs:
serviceusage.services.enableserviceusage.services.get
You might also be able to get these permissions withcustom roles or otherpredefined roles.
Important: Unless you configure your project to use theno backups optionby default, you need to also make sure each user that you want to be able tocreate instances has sufficient permissions to back up instances. For example,make sure each user has the Compute Instance Admin (v1)(roles/compute.instanceAdmin.v1) role. For more information, see therequirements listed for each option inUnderstand and choose the default backup settingin this document.Understand and choose the default backup setting
The default backup setting for a project determines which backup method, if any,is automatically selected when you use theCreate an instance page in the Google Cloud console.Specifically, the default backup setting determines the backup method that isautomatically selected inBack up your data section in theData protection pane.
For reference, theBack up your data section lets you select which backupmethod, if any, to use for your data as follows:
- Back up the instance using a backup plan for a backup vault.
- Back up the disks using a snapshot schedule.
- Don't use automatically scheduled backups.
Optionally, you can select a different option than the automatic selection.
Regardless of the default backup setting, if a backup method is selected,Compute Engine automatically selects a specific backup plan or aspecific snapshot schedule to use. Optionally, you can select a different backupplan or different snapshot schedule before you finish creating the instance.
Note: For more information about which backup plan or snapshot schedule isautomatically selected, seeOptions for the default backup setting.Limitations for the default backup setting
The default backup setting has the following scope:
- The setting doesn't prevent users from selecting a different backup option.
- The setting affects the project; it's not user specific.
The setting affects only theCreate an instance page in theGoogle Cloud console.
- When you use any other method to create an instance, its data isautomatically backed up only if you configure it to.
The setting doesn't affect existing instances.
Note: If you want to change how data is automatically backed up forexisting instances, you can learn how toconfigure backup plans for existing instancesandconfigure scheduled snapshots for existing disksinstead.
This setting specifies only the type of backup option that's selected bydefault. It's not possible to customize the specific backup plan or specificsnapshot schedule that is selected by default. To use a specific backup planor snapshot schedule that isn't selected by default, select a different optionwhile you're creating the instance.
Options for the default backup setting
The options that you can use for the default backup setting are explained in thefollowing table. Specifically, you can directly choosebackup plan,snapshot schedule, orno backups, but until you choose a default backupsetting, your project uses apredefined behavior.
| Options for the default backup setting | |
|---|---|
Predefined (No option is selected) |
|
| Backup plan |
|
| Snapshot schedule |
|
| No backups |
|
View the default backup setting for a project
To view the default backup setting for a project, do the following:
If you haven't already, open the project that you want to view settings forin the Google Cloud console.
In the Google Cloud console, go to theSettings page for Compute Engine.
TheDefault data protection section displays the option that your projectuses for the default backup setting. If none of the radio buttons areselected, then your project uses thepredefined behavior.
Change the default backup setting for a project
To change the default backup setting for a project, do the following in theGoogle Cloud console:
Review the options for the default backup settingand decide which option you want to use.For the selected option, ensure that it matches your use case and that youmeet the requirements.
If you haven't already, open the project that you want to change settingsfor in the Google Cloud console.
Based on the option that you want to choose for the default backup setting,do one of the following:
If you want to choose thebackup plan,snapshot schedule, orno backups option, then complete the following steps:
In the Google Cloud console, go to theSettings page forCompute Engine.
ForDefault data protection, choose the new option.
ClickSave.
If you want to revert to thepredefined behavior thatCompute Engine had automatically selected for the project,complete the steps toremove project metadatafor the
google-compute-default-data-protectionmetadata entry.
Update the default backup setting for all projects in an organization at once
If you want to set or update the default backup setting for all projects in anorganization at once, then you can't use the Google Cloud console. Instead,you can use gcloud CLI to update the setting in the project metadataand automate this update across all projects in the organization. To performthis automation, follow these steps:
Review the options for the default backup settingand decide which option you want to use.For the selected option, ensure that it matches your use case and that youmeet the requirements.
Create a script to automate running the
gcloud compute project-info add-metadatacommandfor all projects in the organization. Specify the--metadata google-compute-default-data-protectionflag with the value ofthe option that you want to change the default backup setting to. Considerthe following examples:To set or update the default backup setting across all projects in theorganization toNo backups, use the following command in your script:
gcloud compute project-info add-metadata \--project=PROJECT_NAME \--metadata=google-compute-default-data-protection=NONE
To set or update the default backup setting across all projects in theorganization toBackup plan, use the following command in your script:
gcloud compute project-info add-metadata \--project=PROJECT_NAME \--metadata=google-compute-default-data-protection=BACKUP
To set or update the default backup setting across all projects in theorganization toSnapshot schedule, use the following command in yourscript:
gcloud compute project-info add-metadata \--project=PROJECT_NAME \--metadata=google-compute-default-data-protection=SNAPSHOT_SCHEDULES
Replace
PROJECT_NAMEwith the name of the project.To learn more about setting and updating your project's metadata,seeSet and remove custom metadata.
What's next
- Learn how tocreate and start an instance.
- Learn how torestore an instance from a backup vault.
- Learn how torestore an instance from a 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 2025-12-15 UTC.