This document guides you through managing Virtual Machine (VM) backups and VM disk snapshots in Google Distributed Cloud (GDC) air-gapped, and details how to view and delete them.
This document helps developers in platform administrator or application operator groups who optimize storage usage while complying with data retention policies. For more information, see Audiences for GDC air-gapped documentation.
Before you begin
Before you perform VM backup and restore operations, you must request the necessary IAM roles.
Request IAM permissions
To manage VMs and VM disk backups, ask your Project IAM Admin to grant you the following roles:
- Project VirtualMachine Admin (
project-vm-admin): Manages VMs in the project namespace. - Backup Creator (
backup-creator): Creates manual backups and restores. - Project Viewer (
project-viewer): Has read-only access to all resources within project namespaces.
Follow the steps to verify your access.
Manage VM backups
The following section describes the technical steps to list and delete your VM backups.
List VM backups
View a list of VM backups using the GDC console or kubectl.
Console
- Sign into the GDC console.
- In the navigation menu, click Backup for Virtual Machines.
- Select a project.
- Click the Backups tab.
- Click a backup in the list to view its details.
kubectl
View a VM backup by listing the backups and viewing their details.
List the existing backups:
kubectl get virtualmachinebackups.virtualmachine.gdc.goog -n PROJECT_NAMEReplace
PROJECT_NAMEwith the name of the project.In the list, find the backup that you want to view.
View the backup details:
kubectl describe virtualmachinebackup.virtualmachine.gdc.goog VM_BACKUP_NAME -n PROJECT_NAMEReplace the following:
VM_BACKUP_NAME: the name of the backup.PROJECT_NAME: the name of the project.
Delete a VM backup
Delete VM backups by using the GDC console or kubectl.
Console
- Sign in to the GDC console.
- In the navigation menu, click Backup for Virtual Machines.
- Select a project.
- Click the Backups tab.
- In the list of backups, find the backup to delete and click Delete Backup.
- In the Backup name field, enter the name of the backup to delete.
- Click Delete Backup.
kubectl
Delete a VM backup using kubectl.
List the existing VM backups:
kubectl get virtualmachinebackups.virtualmachine.gdc.goog -n PROJECT_NAMEReplace
PROJECT_NAMEwith the name of the project.In the list, find the backup that you want to delete.
Issue a
VirtualMachineDeleteBackupRequestto delete the backup:apiVersion: virtualmachine.gdc.goog/v1 kind: VirtualMachineDeleteBackupRequest metadata: name: DELETE_BACKUP_REQUEST_NAME namespace: PROJECT_NAME spec: virtualMachineBackupRef: name: VM_BACKUP_NAMEReplace the following:
DELETE_BACKUP_REQUEST_NAME: the name to give theVirtualMachineDeleteBackupRequestthat is being initiated.VM_BACKUP_NAME: the name of the backup to delete.PROJECT_NAME: the name of the project.
Manage VM disk backups
The following section describes the technical steps to list and delete your VM disk backups.
View snapshots
View snapshots and their details using the Google Cloud console or kubectl.
Console
- Sign in to the GDC console.
- In the navigation menu, click Virtual Machines > Snapshots.
- Select a project.
- In the list of snapshots, click the snapshot name to view its details.
kubectl
View a snapshot by listing the snapshots and viewing their details.
List the existing snapshots:
kubectl get virtualmachinebackups.virtualmachine.gdc.goog -n PROJECT_NAMEReplace
PROJECT_NAMEwith the name of the project.In the list, find the snapshot that you want to view.
View the snapshot details:
kubectl describe virtualmachinebackup.virtualmachine.gdc.goog VM_BACKUP_NAME -n PROJECT_NAMEReplace the following:
VM_BACKUP_NAME: the name of the snapshot.PROJECT_NAME: the name of the project.
Delete a snapshot
Delete snapshots using the Google Cloud console or kubectl. Disks created from
snapshots are not affected when you delete the underlying snapshot.
Console
- Sign in to the GDC console.
- In the navigation menu, click Virtual Machines > Snapshots.
- Select a project.
- In the list of snapshots, find the snapshot to delete and click Delete.
- Click Confirm.
kubectl
Delete a snapshot using kubectl.
List the existing snapshots:
kubectl get virtualmachinebackups.virtualmachine.gdc.goog -n PROJECT_NAMEReplace
PROJECT_NAMEwith the name of the project.In the list, find the snapshot that you want to delete.
Issue a
VirtualMachineDeleteBackupRequestto delete the snapshot:apiVersion: virtualmachine.gdc.goog/v1 kind: VirtualMachineDeleteBackupRequest metadata: name: DELETE_BACKUP_REQUEST_NAME namespace: PROJECT_NAME spec: virtualMachineBackupRef: name: VM_BACKUP_NAMEReplace the following:
DELETE_BACKUP_REQUEST_NAME: the name to give the delete backup request that is being initiated.VM_BACKUP_NAME: the name of the snapshot to delete.PROJECT_NAME: the name of the project.