Create a backup plan

This page describes how to create backup plans for virtual machines (VMs) in Google Distributed Cloud (GDC) air-gapped.

Backup plans provide the configuration and location for backups. A backup plan contains a backup configuration including the source VM and the selection of which VM to back up. Backup plans define a regular schedule for which backups of VMs occur. Every VM-based backup plan references the target VM or VM disk resources to be backed up using a label selector defined in a ProtectedApplication resource.

Before you begin

To create VM backup plans, you must have the following:

  • An existing backup repository. For more information, see Create a backup repository.
  • The necessary identity and access role:

    • Organization Backup Admin: manages backup resources such as backup and restore plans in user clusters. Ask your Organization IAM Admin to grant you the Organization Backup Admin (organization-backup-admin) role. For more information, see Role definitions.

Create a backup plan for VMs

Create a backup plan using the GDC console or the API.

Console

  1. Sign into the GDC console.
  2. In the navigation menu, click Backup for Virtual Machines > Backup plans.
  3. Click Create a backup plan.
  4. In the Project field, select a project for which this backup plan is available.
  5. Enter the backup plan name and description.
  6. In the Backup repo field, select a backup repository. Backup repositories are a set of object storage implementations.
  7. Click Create.

API

To plan your backups, create a VirtualMachineBackupPlanTemplate custom resource. Here's an example of a VirtualMachineBackupPlanTemplate:

apiVersion: virtualmachines.gdc.goog/v1
kind: VirtualMachineBackupPlanTemplate
metadata:
  name: vmbpt-test
spec:
  backupRepository: "default"

This example includes the following value:

  • backupRepository: The name of the repository created in the previous section.

View a backup plan

View a backup plan using the GDC console or kubectl.

Console

View a list of backup plans using the GDC console.

  1. Sign into the GDC console.
  2. In the navigation menu, click Backup for Virtual Machines > Backup plans.
  3. Select a project.
  4. Click a backup plan in the list to view its details.

kubectl

View a backup plan by listing the backup plans and viewing their details using kubectl.

  1. List the existing backup plans:

    kubectl get backupplans -n PROJECT_NAME
    
  2. In the list, find the backup plan that you want to view.

  3. View the backup plan details:

    kubectl describe backupplan BACKUP_PLAN_NAME -n PROJECT_NAME
    

    Replace the following:

    • BACKUP_PLAN_NAME: the name of the backup plan.
    • PROJECT_NAME: the name of the project.

What's next