Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Nesta página, descrevemos como fazer backup de máquinas virtuais (VMs) seguindo os princípios de backup e restauração isolados do Google Distributed Cloud (GDC).
Ele também contém instruções sobre como ver uma lista de backups de VM e excluir backups de VM atuais.
Antes de começar
Para fazer backup de VMs, você precisa ter o seguinte:
Um repositório e um plano de backup. Um backup manual precisa fazer referência a um plano de backup existente para a configuração de backup.
Os papéis necessários de identidade e acesso:
Administrador de VirtualMachine do projeto: gerencia VMs no namespace do projeto. Peça ao administrador do IAM do projeto para conceder a você o papel de administrador de máquinas virtuais do projeto (project-vm-admin).
Criador de backup: cria backups e restaurações manuais. Peça ao administrador do IAM do projeto para conceder a você o papel de criador de backup (backup-creator).
Leitor do projeto: tem acesso somente leitura a todos os recursos nos namespaces do projeto. Peça ao administrador do IAM do projeto para conceder a você o papel de Leitor do projeto (project-viewer).
Fazer backup manual de VMs
Faça backup das VMs usando o console do GDC ou a API.
Console
Faça login no console do GDC.
No menu de navegação, clique em Backup para máquinas virtuais.
Selecione um projeto.
Clique na guia Backups.
Clique em Criar um backup.
No campo VM de origem, selecione a VM que você quer fazer backup.
Digite um Nome para o backup.
No campo Plano de backup, selecione o plano para o qual você quer
criar um backup.
Clique em Criar.
API
Emita uma solicitação de backup de máquina virtual para iniciar um backup:
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-09-04 UTC."],[[["\u003cp\u003eThis page provides instructions on how to manually back up virtual machines (VMs) within the Google Distributed Cloud (GDC) environment, using either the GDC console or the API.\u003c/p\u003e\n"],["\u003cp\u003eTo perform VM backups, users must have an existing backup repository and plan, along with specific identity and access roles such as Project VirtualMachine Admin and Backup Creator.\u003c/p\u003e\n"],["\u003cp\u003eThe document explains how to view a list of existing VM backups and their details through both the GDC console interface and the \u003ccode\u003ekubectl\u003c/code\u003e command-line tool.\u003c/p\u003e\n"],["\u003cp\u003eUsers can delete VM backups via the GDC console or by using \u003ccode\u003ekubectl\u003c/code\u003e to issue a \u003ccode\u003eVirtualMachineDeleteBackupRequest\u003c/code\u003e, following a process to select and confirm the deletion of backups.\u003c/p\u003e\n"]]],[],null,["# Back up VMs\n\nThis page describes how to back up virtual machines (VMs) while adhering to Google Distributed Cloud (GDC) air-gapped backup and restore principles.\nIt also contains instructions on how to view a list of VM backups, and delete existing VM backups.\n\nBefore you begin\n----------------\n\nTo back up VMs, you must have the following:\n\n- An existing [backup repository and backup plan](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/backup-plan-vm). A manual backup must reference an existing backup plan for the backup configuration.\n- The necessary identity and access roles:\n\n - Project VirtualMachine Admin: manages VMs in the project namespace. Ask your Project IAM Admin to grant you the Project VirtualMachine Admin (`project-vm-admin`) role.\n - Backup Creator: creates manual backups and restores. Ask your Project IAM Admin to grant you the Backup Creator (`backup-creator`) role.\n - Project Viewer: has read-only access to all resources within project namespaces. Ask your Project IAM Admin to grant you the Project Viewer (`project-viewer`) role.\n\nManually back up VMs\n--------------------\n\nBack up VMs using either the GDC console or the API. \n\n### Console\n\n1. Sign into the GDC console.\n2. In the navigation menu, click **Backup for Virtual Machines**.\n3. Select a project.\n4. Click the **Backups** tab.\n5. Click **Create a backup**.\n6. In the **Source VM** instance field, select the VM that you want to back up.\n7. Enter a **Name** for the backup.\n8. In the **Backup plan** field, select the backup plan for which you want to to create a backup.\n9. Click **Create**.\n\n### API\n\nIssue a virtual machine backup request to initiate a backup: \n\n apiVersion: virtualmachine.gdc.goog/v1\n kind: VirtualMachineBackupRequest\n metadata:\n name: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eBACKUP_REQUEST_NAME\u003c/span\u003e\u003c/var\u003e\n spec:\n virtualMachineBackupPlanTemplate: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eVM_BACKUP_PLAN_TEMPLATE\u003c/span\u003e\u003c/var\u003e\n virtualMachine: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eVM_NAME\u003c/span\u003e\u003c/var\u003e\n virtualMachineBackupName: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eVM_BACKUP_NAME\u003c/span\u003e\u003c/var\u003e\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eBACKUP_REQUEST_NAME\u003c/var\u003e: name to give the backup request that is being initiated.\n- \u003cvar translate=\"no\"\u003eVM_BACKUP_PLAN_TEMPLATE\u003c/var\u003e: the name of the `VirtualMachineBackupPlanTemplate` resource to use for configuration of the backup.\n- \u003cvar translate=\"no\"\u003eVM_NAME\u003c/var\u003e: the name of the VM to back up.\n- \u003cvar translate=\"no\"\u003eVM_BACKUP_NAME\u003c/var\u003e: the name of the backup to create.\n\nView VM backups\n---------------\n\nView a list of VM backups using the GDC console or `kubectl`. \n\n### Console\n\n1. Sign into the GDC console.\n2. In the navigation menu, click **Backup for Virtual Machines**.\n3. Select a project.\n4. Click the **Backups** tab.\n5. Click a backup in the list to view its details.\n\n### kubectl\n\nView a VM backup by listing the backups and viewing their details.\n\n1. List the existing backups:\n\n kubectl get virtualmachinebackups.virtualmachine.gdc.goog -n \u003cvar translate=\"no\"\u003ePROJECT_NAME\u003c/var\u003e\n\n Replace \u003cvar translate=\"no\"\u003ePROJECT_NAME\u003c/var\u003e with the name of the project.\n2. In the list, find the backup that you want to view.\n\n3. View the backup details:\n\n kubectl describe virtualmachinebackup.virtualmachine.gdc.goog \u003cvar translate=\"no\"\u003eVM_BACKUP_NAME\u003c/var\u003e -n \u003cvar translate=\"no\"\u003ePROJECT_NAME\u003c/var\u003e\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eVM_BACKUP_NAME\u003c/var\u003e: the name of the backup.\n - \u003cvar translate=\"no\"\u003ePROJECT_NAME\u003c/var\u003e: the name of the project.\n\nDelete a VM backup\n------------------\n\nDelete VM backups by using the GDC console or `kubectl`. \n\n### Console\n\n1. Sign in to the GDC console.\n2. In the navigation menu, click **Backup for Virtual Machines**.\n3. Select a project.\n4. Click the **Backups** tab.\n5. In the list of backups, find the backup to delete and click **Delete Backup**.\n6. In the **Backup name** field, enter the name of the backup to delete.\n7. Click **Delete Backup**.\n\n### kubectl\n\nDelete a VM backup using `kubectl`.\n\n1. List the existing VM backups:\n\n kubectl get virtualmachinebackups.virtualmachine.gdc.goog -n \u003cvar translate=\"no\"\u003ePROJECT_NAME\u003c/var\u003e\n\n Replace \u003cvar translate=\"no\"\u003ePROJECT_NAME\u003c/var\u003e with the name of the project.\n2. In the list, find the backup that you want to delete.\n\n3. Issue a `VirtualMachineDeleteBackupRequest` to delete the backup:\n\n apiVersion: virtualmachine.gdc.goog/v1\n kind: VirtualMachineDeleteBackupRequest\n metadata:\n name: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eDELETE_BACKUP_REQUEST_NAME\u003c/span\u003e\u003c/var\u003e\n namespace: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003ePROJECT_NAME\u003c/span\u003e\u003c/var\u003e\n spec:\n virtualMachineBackupRef:\n name: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eVM_BACKUP_NAME\u003c/span\u003e\u003c/var\u003e\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eDELETE_BACKUP_REQUEST_NAME\u003c/var\u003e: the name to give the `VirtualMachineDeleteBackupRequest` that is being initiated.\n - \u003cvar translate=\"no\"\u003eVM_BACKUP_NAME\u003c/var\u003e: the name of the backup to delete.\n - \u003cvar translate=\"no\"\u003ePROJECT_NAME\u003c/var\u003e: the name of the project.\n\nWhat's next\n-----------\n\n- [Create a VM from a backup](/distributed-cloud/hosted/docs/latest/gdch/platform-application/pa-ao-operations/vm-backup/create-vm-from-backup)"]]