How do I back up an instance store volume on my Amazon EC2 instance to Amazon EBS?
Last updated: 2019-10-29
I want to prepare a backup of the instance store volume on my Amazon Elastic Compute Cloud (Amazon EC2) instance by creating an Amazon Elastic Block Store (Amazon EBS) volume. How do I do that?
Keep backups of all data stored in your AWS infrastructure so you can roll back changes and protect your data from application failures and infrastructure events.
You can back up data stored on an instance store volume in one of the following ways:
- Create a new EBS volume, and then copy the data on your instance store volume to the EBS volume.
- Back up the individual files stored on an EBS volume.
Creating a new EBS volume and migrating your data
- Create an EBS volume. Be sure to select a size large enough to hold the data that you’re migrating.
- Attach the EBS volume to your instance.
- Make the volume available to your operating system, and then create a compatible file system on the volume. For Linux instances, see Making an Amazon EBS volume available for use on Linux. For Windows instances, see Making an Amazon EBS volume available for use on Windows.
- Copy the data using the disk management or migration tool you prefer for your operating system, such as rsync for Linux or robocopy for Windows. For more information on rsync, see rsync(1) on the Linux man page. For more information on robocopy, see robocopy in the Microsoft documentation.
Note: Keep both volumes available until you’re sure that the copy operation is successful and completed. You might need to perform additional configuration before the new EBS volumes are usable with your instance.
Backing up individual files stored on an EBS volume
You can back up individual files instead of, or in addition to, backing up the volume itself. For an example solution using Amazon Simple Storage Service (Amazon S3), see Getting the most out of the Amazon S3 CLI.