Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

api for enabling Backup and DR service for a VM

Do we have any api for enabling and onboarding VM to the Backup and DR service? or Gcloud command to do it programmatically ?

 

0 2 379
2 REPLIES 2

Hello @gcloudLearning,

Welcome to Google Cloud Community!

You may use the management consoel Onboarding Wizard to discover and add Compute Engine instances.


  1. In the management console, click the Backup and Recover drop-down menu and select Backup.

  2. Select Compute Engine.

  3. Select your credential and click Next. The dropdowns are populated with the Appliance as your appliance, and the Zone as the one that matches the credential you added.

  4. Choose a zone where the instances to be backed up are located.

    On the next panel a list of Compute Engine instances appear. If no instances appear, then ensure that the zone selected matches with the zone where your Compute Engine instances are located or running. Use the checkbox to select the Compute Engine instances to be backed up and then select Next.

  5. When you use the Onboarding Wizard you have four choices:

    • Apply a backup plan: To apply a backup plan to the discovered instances and start creating backups.

    • Add to a logical group: To add the discovered instances to a logical group and use the backup plan applied to that group.

    • Add as unmanaged: To discover the instance and apply a backup plan to the discovered instances later.

    • Mark as ignored: To discover the instance as ignored, meaning they are added but without a backup plan and with the ignored flag in the Applications page, indicating they do not need a backup plan.

    If you choose to apply a backup plan, then use the Onboarding wizard to attach the policy template and profile to your Compute Engine instance. Select the instance you want to back up using the checkbox and then use the three drop-downs above it to:

    1. Apply a backup plan.

    2. Use the template you created.

    3. Select OK.

  6. Click Next.

  7. A Summary screen appears. Select Finish to complete the onboarding process which starts backing up the selected Compute Engine instances based on the Policy Template you attached.

  8. After onboarding is complete, a pop-up appears. Click Finish again. Once the policy template is attached to the selected VMs, the status changes to a green checkmark.




For now there is a Powershell module that can help you - see this URL : https://github.com/Actifio/AGMPowerCLI/blob/main/UsageExamples.md#compute-engine-instance-onboarding...