I am trying to create a backup and restore mechanism for my EBS volumes
I could easily create a mechanism for this by using
to take a snapshot of volume
ec2-create-snapshot -d $description $volume
and restore
ec2-create-volume --snapshot $snapid -z $zone
Now as per my understanding, these snapshots are still on EBS. So a better way will be to move the snapshots to S3.
So how can I move the snapshots to s3 bucket?
With Amazon EBS, you can create point-in-time snapshots of volumes, which we store for you in Amazon S3. After you create a snapshot and it has finished copying to Amazon S3 (when the snapshot status is completed ), you can copy it from one AWS Region to another, or within the same Region.
When you create a snapshot for an EBS volume that serves as a root device, you should stop the instance before taking the snapshot. You cannot create snapshots from instances for which hibernation is enabled, or from hibernated instances.
EBS snapshots are incremental (except for the first snapshot). That data is compressed based on AWS's own heuristics. You have no visibility into the actual compressed data's size.
Amazon EBS snapshots are a point-in-time copy of your EBS volumes. By default, snapshots of EBS volumes on an Outpost are stored in Amazon S3 in the Region of the Outpost. You can also use Amazon EBS local snapshots on Outposts to store snapshots of volumes on an Outpost locally in Amazon S3 on the Outpost itself.
EBS snapshots are stored in S3. There should not be any need to move the snapshot anywhere.
The question seems sensible enough to me. In our case we want to take an EBS volume that we are using in us-west-1 region and provide an image of it (via S3) so that we can attach it to an instance running in us-east-1.
As simple as this concept seems, there is not apparently a simple solution currently, nor even a solution at all. If anybody knows of one please post info or links here, thanks.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With