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.
- 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 (
Create a backup plan for VMs
Create a backup plan using the GDC console or the API.
Console
- Sign into the GDC console.
- In the navigation menu, click Backup for Virtual Machines > Backup plans.
- Click Create a backup plan.
- In the Project field, select a project for which this backup plan is available.
- Enter the backup plan name and description.
- In the Backup repo field, select a backup repository. Backup repositories are a set of object storage implementations.
- 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.
- Sign into the GDC console.
- In the navigation menu, click Backup for Virtual Machines > Backup plans.
- Select a project.
- 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
.
List the existing backup plans:
kubectl get backupplans -n PROJECT_NAME
In the list, find the backup plan that you want to view.
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.