This page explains how to choose, view, and change the option for a project's default backup setting. This page might also help you choose which backup setting you want to select when creating an instance.
When you create a Compute Engine instance in the Google Cloud console, you can specify the method that you want use to back up your data. The default backup setting is a project-wide Compute Engine setting that specifies which method is preselected by default when you create an instance in the Google Cloud console. For example, you can configure the default backup setting to help encourage a project to use your preferred method for automatically backing up data.
Before you begin
-
To learn about the options that you can use to back up data, see Data protection options. Specifically, this page discusses options for automatically scheduled backups, especially backup plans for backup vaults and snapshot schedules.
Pricing
Some of the backup options incur additional costs when you create an instance. For more information, see the pricing for each option in Understand and choose the default backup setting in 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, see Manage 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 the Required 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.setCommonInstanceMetadata
-
compute.projects.get
-
-
Enable APIs:
-
serviceusage.services.enable
-
serviceusage.services.get
-
You might also be able to get these permissions with custom roles or other predefined roles.
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 the Create an instance page in the Google Cloud console. Specifically, the default backup setting determines the backup method that is automatically selected in Back up your data section in the Data protection pane.
For reference, the Back up your data section lets you select which backup method, 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 a specific snapshot schedule to use. Optionally, you can select a different backup plan or different snapshot schedule before you finish creating the instance.
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 the Create an instance page in the Google Cloud console.
- When you use any other method to create an instance, its data is automatically backed up only if you configure it to.
The setting doesn't affect existing instances.
This setting specifies only the type of backup option that's selected by default. It's not possible to customize the specific backup plan or specific snapshot schedule that is selected by default. To use a specific backup plan or snapshot schedule that isn't selected by default, select a different option while 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 the following table. Specifically, you can directly choose backup plan, snapshot schedule, or no backups, but until you choose a default backup setting, your project uses a predefined 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 for in the Google Cloud console.
In the Google Cloud console, go to the Settings page for Compute Engine.
The Default data protection section displays the option that your project uses for the default backup setting. If none of the radio buttons are selected, then your project uses the predefined behavior.
Change the default backup setting for a project
To change the default backup setting for a project, do the following:
Decide the option that you want to change the default backup setting to. Make sure you match the use case and meet the listed requirements for that option.
If you haven't already, open the project that you want to change settings for 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 the backup plan, snapshot schedule, or no backups option, complete the following steps:
In the Google Cloud console, go to the Settings page for Compute Engine.
For Default data protection, choose the new option.
Click Save.
If you want to revert back to the predefined behavior, complete the steps to remove project metadata for the
google-compute-default-data-protection
metadata entry.
What's next
- Learn how to create and start an instance.
- Learn how to restore an instance from a backup vault.
- Learn how to restore an instance from a snapshot.