Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Halaman ini menjelaskan cara mencadangkan virtual machine (VM) sambil mematuhi prinsip pencadangan dan pemulihan yang terisolasi dari internet Google Distributed Cloud (GDC).
Panduan ini juga berisi petunjuk tentang cara melihat daftar cadangan VM, dan menghapus cadangan VM yang ada.
Sebelum memulai
Untuk mencadangkan VM, Anda harus memiliki hal berikut:
Project VirtualMachine Admin: mengelola VM di namespace project. Minta Admin IAM Project Anda untuk memberi Anda peran Project VirtualMachine Admin (project-vm-admin).
Pembuat Cadangan: membuat cadangan dan pemulihan manual. Minta Admin IAM Project Anda untuk memberi Anda peran Pembuat Cadangan (backup-creator).
Pelihat Project: memiliki akses hanya baca ke semua resource dalam namespace project. Minta Admin IAM Project Anda untuk memberi Anda peran Project Viewer (project-viewer).
Mencadangkan VM secara manual
Mencadangkan VM menggunakan konsol GDC atau API.
Konsol
Login ke konsol GDC.
Di menu navigasi, klik Pencadangan untuk Virtual Machine.
Pilih project.
Klik tab Backups.
Klik Buat cadangan.
Di kolom instance Source VM, pilih VM yang ingin Anda cadangkan.
Masukkan Nama untuk cadangan.
Di kolom Rencana cadangan, pilih rencana cadangan yang ingin Anda
buat cadangannya.
Klik Buat.
API
Keluarkan permintaan pencadangan mesin virtual untuk memulai pencadangan:
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 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)"]]