Configure the default backup setting for the console


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

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:

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.

  • 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)

  • Use case: All projects use this behavior until you change the default backup setting for your project or restore this behavior.

  • Effect: Compute Engine automatically selects a default backup behavior that the project has enabled by using the following logic:

    • If Backup and DR has already been enabled for the project, then the project uses the same behavior as selecting the backup plan option.
    • Otherwise, the project uses the same behavior as selecting the snapshot schedule option.
  • Requirements: See the requirements for the backup plan and snapshot schedule options respectively.

  • Pricing: See the pricing for the backup plan and snapshot schedule options respectively.

Backup plan
  • Use case: We recommend this option for most projects. Review the use cases for the other options to see if your project is an exception.

  • Effect: When you're creating a new instance, backup plans are selected by default to back up data. Specifically, the backup plan that is automatically selected is the default backup plan for the region that contains the instance. When you create an instance, Compute Engine automatically creates a default backup plan and default backup vault for the region as needed and if they don't already exist.

    • The default backup plan runs daily between midnight and 6:00 AM in the local timezone for the region, is stored in the default backup vault for the region, and each backup is retained for a maximum of 14 days. The default backup plan is named default-compute-instance-plan-REGION. Replace REGION with the region that contains the instance; for example, us-central1.
    • The default backup vault has a minimum enforced retention period of 1 day. The default backup vault is named default-vault-REGION. Replace REGION with the region that contains the instance; for example, us-central1.
  • Requirements:

  • Pricing: Backup plans and vaults incur additional costs. For more information, see Backup and DR pricing.

Snapshot schedule
  • Use case: We recommend this option only if any of the following are true for your project:

    • You want to or already store backups in multi-regional locations. For more information about when to use multi-regional locations, see Snapshot storage locations.
    • You don't match the use case for the no backups option and can't meet the requirements for backup plan option.
  • Effect: When you're creating a new instance, snapshot schedules are selected by default to back up data. Specifically, the snapshot schedule that is selected by default varies. If the project already has compatible snapshot schedules, the automatic selection is the snapshot schedule that comes first in alphabetical order. Alternatively, if no compatible snapshot schedule exists, the automatic selection is a default snapshot schedule for the region that contains the instance. Compute Engine automatically creates the default snapshot schedule when needed.

    • The default snapshot schedule runs daily at 6:00 PM UTC, is located in the region that contains the instance, stores snapshots in the multi-region that contains the instance, and each snapshot is retained for a maximum of 14 days. The default snapshot schedule is named default-schedule-1 for each region.
  • Requirements:

  • Pricing: Snapshot schedules incur additional costs. For more information, see Compute Engine disk snapshot pricing.

No backups
  • Use case: Use this option only when one or more of the following are true for your project:

    • You're confident that you will have other options to recover your data if it's lost due to unforeseen events. For example, you already use tags to automatically apply backup plans, or you maintain replicated data in a separate location.
    • You're confident that your data won't need to be recovered if it's lost. For example, you only use the project for experimental workloads.
    • You can't meet the requirements for the other options.
    • You can't incur the additional costs for the other options.
  • Effect: When you're creating a new instance, data is not automatically backed up by default.

  • Requirements: This option doesn't have any requirements.

  • Pricing: This option doesn't incur additional costs.

View the default backup setting for a project

To view the default backup setting for a project, do the following:

  1. If you haven't already, open the project that you want to view settings for in the Google Cloud console.

    Go to project selector

  2. In the Google Cloud console, go to the Settings page for Compute Engine.

    Go to Settings

    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:

  1. 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.

  2. If you haven't already, open the project that you want to change settings for in the Google Cloud console.

    Go to project selector

  3. 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:

      1. In the Google Cloud console, go to the Settings page for Compute Engine.

        Go to Settings

      2. For Default data protection, choose the new option.

      3. 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