Restore EBS volumes from VSS-enabled EBS snapshots - Amazon Elastic Compute Cloud
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).

Restore EBS volumes from VSS-enabled EBS snapshots

You can use the RestoreVssSnapshotSampleScript.ps1 script to restore volumes on an instance from VSS-enabled EBS snapshots. This script performs the following tasks:

  • Stops an instance

  • Removes all existing drives from the instance (except the boot volume, if it was excluded)

  • Creates new volumes from the snapshots

  • Attaches the volumes to the instance by using the device ID tag on the snapshot

  • Restarts the instance

Important

The following script detaches all volumes attached to an instance, and then creates new volumes from a snapshot. Make sure that you have properly backed-up the instance. The old volumes are not deleted. If you want, you can edit the script to delete the old volumes.

To restore volumes from VSS-enabled EBS snapshots
  1. Download the RestoreVssSnapshotSampleScript.zip file and extract the file contents.

  2. Open RestoreVssSnapshotSampleScript.ps1 in a text editor and edit the sample call at the bottom of the script with a valid EC2 instance ID and EBS snapshot ID, and then run the script from PowerShell.