Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Questa pagina descrive come eseguire il backup delle macchine virtuali (VM) rispettando i principi di backup e ripristino isolati di Google Distributed Cloud (GDC).
Contiene anche istruzioni su come visualizzare un elenco di backup delle VM ed eliminare i backup delle VM esistenti.
Prima di iniziare
Per eseguire il backup delle VM, devi disporre di quanto segue:
Amministratore VirtualMachine progetto: gestisce le VM nello spazio dei nomi del progetto. Chiedi all'amministratore IAM del progetto di concederti il ruolo Project VirtualMachine Admin (project-vm-admin).
Backup Creator: crea backup manuali ed esegue ripristini. Chiedi all'amministratore IAM del progetto di concederti il ruolo Autore backup (backup-creator).
Visualizzatore progetto: ha accesso in sola lettura a tutte le risorse all'interno degli spazi dei nomi del progetto. Chiedi all'amministratore IAM del progetto di concederti il ruolo Visualizzatore progetto (project-viewer).
Esegui manualmente il backup delle VM
Esegui il backup delle VM utilizzando la console GDC o l'API.
Console
Accedi alla console GDC.
Nel menu di navigazione, fai clic su Backup per le macchine virtuali.
Seleziona un progetto.
Fai clic sulla scheda Backup.
Fai clic su Crea un backup.
Nel campo dell'istanza VM di origine, seleziona la VM di cui vuoi eseguire il backup.
Inserisci un nome per il backup.
Nel campo Piano di backup, seleziona il piano di backup per cui vuoi
creare un backup.
Fai clic su Crea.
API
Emetti una richiesta di backup della macchina virtuale per avviare un backup:
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 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)"]]