Appliquer un plan de sauvegarde lors de la création d'une instance
Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Ce document explique comment appliquer un plan de sauvegarde Backup and DR Service à votre instance Compute Engine lorsque vous la créez à l'aide de la consoleGoogle Cloud .
Utilisez les plans de sauvegarde du service Backup and DR pour créer des sauvegardes immuables et basées sur des règles de vos instances Compute Engine, puis stockez-les dans des emplacements de stockage sécurisés et isolés.
Les plans de sauvegarde Backup and DR vous permettent de définir des stratégies de sauvegarde avancées pour stocker vos instances Compute Engine dans des emplacements de stockage sécurisés appelés coffres de sauvegarde. À l'aide du plan de sauvegarde appliqué à votre instance, vous pouvez créer des sauvegardes planifiées ou à la demande de votre instance dans un backup vault.
Avant de commencer
Activez l'API du service Backup and DR là où se trouvent les instances Compute Engine.
Configurez Log Analytics sur votre bucket pour surveiller les jobs de sauvegarde Backup and DR.
Rôles requis
Pour obtenir les autorisations nécessaires pour créer une instance et appliquer un plan de sauvegarde lors de sa création, demandez à votre administrateur de vous accorder les rôles IAM suivants :
Si vous souhaitez sauvegarder une instance Compute Engine dans un coffre de sauvegarde qui se trouve dans un projet différent de celui de l'instance, assurez-vous que l'
agent de service du coffre Backup and DR a été autorisé à accéder aux instances de ce projet. (Si le coffre de sauvegarde et l'instance se trouvent dans le même projet, cette autorisation est déjà accordée par défaut.)
Pour vous assurer que l'agent de service du coffre Backup and DR dispose des autorisations nécessaires pour sauvegarder une instance Compute Engine dans un coffre de sauvegarde, demandez à votre administrateur d'accorder à l'agent de service du coffre Backup and DR le rôle IAM Opérateur Compute Engine Backup and DR (roles/backupdr.computeEngineOperator) sur le projet pour l'instance Compute Engine.
Créer une instance à laquelle un plan de sauvegarde est appliqué
Pour créer une instance à laquelle un plan de sauvegarde est appliqué, procédez comme suit dans la consoleGoogle Cloud :
Dans la console Google Cloud , accédez à la page Créer une instance.
Dans le champ Région, spécifiez la région dans laquelle vous souhaitez créer votre instance.
Facultatif : Dans le champ Zone, sélectionnez une zone pour cette instance.
La sélection par défaut est Tous. Si vous ne modifiez pas cette sélection par défaut, Google choisit automatiquement une zone en fonction du type de machine et de la disponibilité.
Pour spécifier un plan de sauvegarde pour cette instance, procédez comme suit :
Dans le menu de navigation, cliquez sur OS et stockage. Le volet Système d'exploitation et stockage s'affiche.
Dans la section Plan de sauvegarde, cliquez sur Sélectionner un forfait.
Dans le volet Sélectionner un forfait de sauvegarde qui s'affiche, procédez comme suit :
Vérifiez que le champ Projet contient le même nom de projet que celui où se trouvent vos plans de sauvegarde. Si ce n'est pas le cas, sélectionnez le bon projet.
Dans la colonne Nom du plan de sauvegarde, cliquez sur le nom du plan de sauvegarde que vous souhaitez utiliser.
Pour confirmer votre choix de forfait de sauvegarde et revenir au volet Système d'exploitation et stockage, cliquez sur Appliquer.
Facultatif. Spécifiez les autres paramètres de configuration de votre choix. Pour en savoir plus sur les options de configuration personnalisées, consultez Créer et démarrer une instance.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/04 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/09/04 (UTC)."],[[["\u003cp\u003eThis guide outlines the process of applying a Backup and DR Service backup plan to a new Compute Engine instance during its creation using the Google Cloud console.\u003c/p\u003e\n"],["\u003cp\u003eBackup and DR backup plans define rules for backing up Compute Engine instances, including frequency, retention, and replication, storing them in secure backup vaults.\u003c/p\u003e\n"],["\u003cp\u003eTo apply a backup plan during instance creation, you must have the required IAM roles and have previously created a backup vault and a backup plan in the same region.\u003c/p\u003e\n"],["\u003cp\u003eCertain Compute Engine instance configurations are not supported for Backup and DR Service backups, including those with extreme or Hyperdisk volumes, specific machine types, CMEK/CSEK encryption, no attached disks, or those larger than 200 TB.\u003c/p\u003e\n"],["\u003cp\u003eThe Google Cloud console is required to apply a backup plan when creating an instance, with the option located in the "OS and storage" or "Data protection" section of the instance creation process.\u003c/p\u003e\n"]]],[],null,["# Apply a backup plan during instance creation\n\n*** ** * ** ***\n\nThis document explains how to apply a Backup and DR Service backup plan to your\nCompute Engine instance when you create the instance using the\nGoogle Cloud console.\n\nUse Backup and DR Service backup plans to create rule-based and indelible backups\nof your Compute Engine instances and then store those backups in a\nsecure and isolated storage locations.\n\nBackup and DR backup plans let you define advanced backup strategies\nto store your Compute Engine instances in secure storage locations\ncalled backup vaults. Using the backup plan applied to your instance,\nyou can create scheduled or on-demand backups of your instance in a\nbackup vault.\n\nBefore you begin\n----------------\n\n- Enable the Backup and DR Service API where the Compute Engine instances are located.\n [Enable the API](https://console.cloud.google.com/flows/enableapi?apiid=backupdr.googleapis.com&_ga=2.145630134.30427899.1640890668-1982243420.1634228058)\n\n- [Create a backup vault](/backup-disaster-recovery/docs/cloud-console/backup-vault-create)\n- [Create a backup plan](/backup-disaster-recovery/docs/cloud-console/backup-plan-create)\n- Set up Log Analytics on your bucket to monitor Backup and DR backup jobs.\n\n### Required roles\n\n-\n\n To get the permissions that\n you need to create an instance and apply a backup plan during its\n creation,\n\n ask your administrator to grant you the\n following IAM roles:\n\n - To create the instance: [Compute Instance Admin (v1)](/iam/docs/roles-permissions/compute#compute.instanceAdmin.v1) (`roles/compute.instanceAdmin.v1`) on the project for the Compute Engine instance\n - To configure scheduled backups or run on-demand backups:\n - [Backup and DR Backup User](/iam/docs/roles-permissions/backupdr#backupdr.backupUser) (`roles/backupdr.backupUser`) on the project for the backup vault\n - [Viewer](/iam/docs/roles-overview#basic) (`roles/viewer`) on the project for the backup vault\n\n\n For more information about granting roles, see [Manage access to projects, folders, and organizations](/iam/docs/granting-changing-revoking-access).\n\n\n You might also be able to get\n the required permissions through [custom\n roles](/iam/docs/creating-custom-roles) or other [predefined\n roles](/iam/docs/roles-overview#predefined).\n- If you want to back up a Compute Engine instance to a\n backup vault that is in a different project than the instance, then\n make sure the\n [Backup and DR Vault Service Agent](/iam/docs/service-agents#backup-and-dr-vault-service-agent) for the backup vault has been\n granted permission to access the instances in that project. (If the\n backup vault and instance are in the same project, then this\n permission is already granted by default.)\n\n-\n\n To ensure that Backup and DR Vault Service Agent has the necessary\n permissions to back up a Compute Engine instance to a\n backup vault,\n\n ask your administrator to grant Backup and DR Vault Service Agent the\n\n\n [Backup and DR Compute Engine Operator](/iam/docs/roles-permissions/backupdr#backupdr.computeEngineOperator) (`roles/backupdr.computeEngineOperator`)\n IAM role on the project for the Compute Engine instance.\n\n\n | **Important:** You must grant this role to Backup and DR Vault Service Agent, *not* to your user account. Failure to grant the role to the correct principal might result in permission errors.\n\n \u003cbr /\u003e\n\nCreate an instance that has a backup plan applied\n-------------------------------------------------\n\nTo create an instance that has a backup plan applied, follow these steps in the\nGoogle Cloud console:\n\n1. In the Google Cloud console, go to the **Create an instance** page.\n\n [Go to Create an instance](https://console.cloud.google.com/compute/instancesAdd)\n\n If prompted, select your project and click **Continue**.\n\n The **Create an instance** page appears and displays the\n **Machine configuration** pane.\n2. In the **Name** field, specify a name for your instance. For more\n information, see\n [Resource naming convention](/compute/docs/naming-resources#resource-name-format).\n\n3. In the **Region** field, specify the region where you want your instance.\n\n4. Optional: In the **Zone** field, select a zone for this instance.\n\n The default selection is **Any**. If you don't change this default\n selection, then Google automatically chooses a zone for you based on\n machine type and availability.\n5. To specify a backup plan for this instance, do the following:\n\n 1. In the navigation menu, click **OS and storage** . The\n **Operating system and storage** pane appears.\n\n | **Important:** If you see a **Data protection** pane in the navigation menu, click **Data protection** instead of **OS and storage** and then continue with the remaining steps. For more information, see the [February 14, 2025 release note](/compute/docs/release-notes#February_14_2025).\n 2. In the **Backup plan** section, click **Select a plan**.\n\n 3. In the **Select a backup plan** pane that appears, do the following:\n\n 1. Verify that the **Project** field has the same project name where your backup plans exist. If not, select the correct project.\n 2. In the **Backup plan name** column, click the name of the back plan that you want to use.\n 3. To confirm your choice of backup plan and return to the **Operating system and storage** pane, click **Apply**.\n6. Optional. Specify any other configuration parameters of your choice. For\n more information about custom configuration options, see\n [Create and start an instance](/compute/docs/instances/create-start-instance).\n\n7. To create and start the VM, click **Create**.\n\nWhat's next\n-----------\n\n- Learn how to use your instance's backup plan to [schedule or create backups in a backup vault](/backup-disaster-recovery/docs/cloud-console/compute/compute-instance-backup).\n- Learn how to [restore an instance from a backup vault](/backup-disaster-recovery/docs/cloud-console/compute/compute-instance-restore).\n- Learn how to [change the backup plan that's applied to an instance](/compute/docs/instances/change-backup-plan-for-instance) ([Preview](/products#product-launch-stages))."]]