Restoring a virtual machine - Amazon Backup
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Restoring a virtual machine

Use the Amazon Backup console to restore virtual machine recovery points

You can restore a virtual machine from multiple locations in the left navigation pane of the Amazon Backup console:

  • Choose Hypervisors to view recovery points for virtual machines managed by a hypervisor that is connected to Amazon Backup.

  • Choose Virtual machines to view recovery points for virtual machines across all your hypervisors that are connected to Amazon Backup.

  • Choose Backup vaults to view recovery points stored in a specific Amazon Backup vault.

  • Choose Protected resources to view recovery points across all your Amazon Backup protected resources.

If you need to restore a virtual machine that no longer has a connection with Backup gateway, choose Backup vaults or Protected resources to locate your recovery point.

Amazon Backup restores of virtual machines are non-destructive. This means that Amazon Backup does not overwrite existing virtual machines during a restore. Instead, it restores by deploying a new virtual machine.

Your restored virtual machine starts on your infrastructure in shutdown mode.

To restore a virtual machine to VMware, VMware Cloud on Amazon, and VMware Cloud on Amazon Outposts:
  1. In the Hypervisors or Virtual machines views, choose the VM name to restore. In the Protected resources view, choose the virtual machine Resource ID to restore.

  2. Choose the radial button next to the Recovery point ID to restore.

  3. Choose Restore.

  4. Choose the Restore type.

    1. Full restore restores all the virtual machine's disks.

    2. Disk-level restore restores a user-defined selection of one or more disks. Use the drop-down menu to select which disks to restore.

  5. Choose the Restore location. The options are VMware, VMware Cloud on Amazon, and VMware Cloud on Amazon Outposts.

  6. If you are doing a full restore, skip to the next step. If you are performing a disk-level restore, there will be a drop-down menu under VM disks. Choose one or more bootable volumes to restore.

  7. Select a Hypervisor from the dropdown menu to manage the restored virtual machine

  8. For the restored virtual machine, use your organization’s virtual machine best practices to specify its:

    1. Name

    2. Path (such as /datacenter/vm)

    3. Compute resource name (such as VMHost or Cluster)

      If a host is part of a cluster then you cannot restore to the host but only to the given cluster.

    4. Datastore

  9. For Restore role, select either the Default role (recommended) or Choose an IAM role using the dropdown menu.

  10. Choose Restore backup.

  11. Optional: Check when your restore job has the status Completed. In the left navigation menu, choose Jobs.

To restore a virtual machine to Amazon EBS:
  1. In the Hypervisors or Virtual machines views, choose the VM name to restore. In the Protected resources view, choose the virtual machine Resource ID to restore.

  2. Choose the radial button next to the Recovery point ID to restore.

  3. Choose Restore.

  4. Choose the Restore type.

    1. Disk restore restores a user-defined selection of one disk. Use the drop-down menu to select which disk to restore.

  5. Choose the Restore location as Amazon EBS.

  6. Under the VM disk dropdown menu, choose bootable volume to restore.

  7. Under EBS Volume type, choose the volume type.

  8. Choose your Availability Zone.

  9. Encryption (optional). Check the box if you choose to encrypt the EBS volume.

  10. Select your KMS key from the dropdown menu.

  11. For Restore role, select either the Default role (recommended) or Choose an IAM role using the dropdown menu.

  12. Choose Restore backup.

  13. Optional: Check when your restore job has the status Completed. In the left navigation menu, choose Jobs.

  14. Optional: Visit How do I create an LVM logical volume on an entire Amazon EBS volume? to learn more on how to mount managed volumes and access data on the restored Amazon EBS volume.

Restore a virtual machine to an Amazon EC2 instance

Restoring (or migrating) a virtual machine to EC2 requires a license. By default, an Amazon will include a license (charges apply). For more information, see Licensing options in the Amazon EC2 VM Import/Export User Guide.

There is a maximum limit of 5 TB (terabytes) for each virtual machine disk.

  1. In the Hypervisors or Virtual machines views, choose the VM name to restore. In the Protected resources view, choose the virtual machine Resource ID to restore.

  2. Choose the radial button next to the Recovery point ID to restore.

  3. Choose Restore.

  4. Choose the Restore type.

    1. Full restore restores the file system completely, including the root-level folder and files.

  5. Choose the Restore location as Amazon EC2.

  6. Under the dropdown menu Instance type, choose the combination of compute and memory necessary for your new instance.

    Note

    Choose an instance that has compute and memory to match or exceed that of your original machine; otherwise performance will be affected.

  7. Select the Virtual Private Cloud (VPC) that defines the virtual networking environment.

  8. Select the subnet group. This is a range of IP addresses in your virtual private cloud which can be used to isolate distinct Amazon EC2 instances from each other.

  9. Specify the security groups you want to use to determine firewall rules for your instance traffic.

  10. For Restore role, select either the Default role (recommended) or Choose an IAM role using the dropdown menu.

  11. Choose Restore backup.

Check when your restore job has the status Completed. In the left navigation menu, choose Jobs.

Use Amazon CLI to restore virtual machine recovery points

Use StartRestoreJob.

You can specify the following metadata for a virtual machine restore to Amazon EC2 and Amazon EBS:

RestoreTo InstanceType VpcId SubnetId SecurityGroupIds IamInstanceProfileName InstanceInitiatedShutdownBehavior HibernationOptions DisableApiTermination Placement CreditSpecification RamdiskId KernelId UserData EbsOptimized LicenseSpecifications KmsKeyId AvailabilityZone EbsVolumeType IsEncrypted ItemsToRestore RequireIMDSv2

You can specify the following metadata for a virtual machine restore to VMware, VMware Cloud on Amazon, and VMware cloud on Amazon Outpost:

RestoreTo HypervisorArn VMName VMPath ComputeResourceName VMDatastore DisksToRestore ItemsToRestore

This example shows how to conduct a full restore to VMware:

'{"RestoreTo":"VMware","HypervisorArn":"arn:aws:backup-gateway:us-east-1:209870788375:hypervisor/hype-9B1AB1F1","VMName":"name","VMPath":"/Labster/vm","ComputeResourceName":"Cluster","VMDatastore":"vsanDatastore","DisksToRestore":"[{\"DiskId\":\"2000\",\"Label\":\"Hard disk 1\"}]","vmId":"vm-101"}'

To restore to an Amazon EC2 instance, only "RestoreTo":"EC2Instance" needs to be specified. All other attributes will be defaulted.

Note

Restoring (or migrating) a virtual machine to EC2 requires a license. By default, Amazon will include a license (charges apply). For more information, see Licensing options in the Amazon EC2 VM Import/Export User Guide.