Featured image of post AWS 3: Block Volume and Snapshot

AWS 3: Block Volume and Snapshot

learning AWS Elastic Block Store (EBS), snapshot, Intance Store

EBS Overview

  • An EBS (Elastic Block Store) Volume is a network drive you can attach to your instances while they run.
  • It allows your instances to persist data, even after their termination
  • They are bound to a specific availability zone

Snapshot

  • make a backup (snapshot) of your EBS volume at a point in time
  • not necessary to detach volume to do snapshot, but recommended
  • can copy snapshots across AZ or region
  • Snapshot Archive
    • move a snapshot to an ‘archive tier’ that is 75% cheaper
    • takes within 24 to 72 hours for restoring the archive
  • Recycle Bin for Snapshots
    • Setup rules to retain deleted snapshots so you can recover them after an accidental deletion
    • Specify retention (from 1 day to 1 year)

EC2 Instance Store

  • EBS volumes are network drives with good but “limited” performance
  • if you need a high-performance hardware disk, use EC2 Instance Store

Hands on

Create EBS Volume

  1. create new instance (see tutorial in the aws-ec2)
  2. check the EBS by clicking the new instance > “Storage” tab > “Block devices”
  3. to add new volume to the instance, create new one and config the “Volume settings” as figure below aws-ebs-volume-settings
  4. to see the AZ of the instance, click the instance > “Networking” tab > see “Availability zone”
  5. you can also config the volume during the creation of new instance like the figure below aws-ebs-init-volume-instance

Snapshot

Volume to Snapshot

  1. pick a volume you want to create snapshot, click “Actions” and choose “Create snapshot” aws-ebs-create-snapshot
  2. then you can give description in the snapshot details and add some tags. after finish, click “Create snapshot”

Copy snapshot

  1. in the “Snapshots” menu, right click a snapshot and click “Copy snapshot” aws-ebs-copy-snapshot
  2. in the “Snapshot copy details”, you can pick “Destination Region” is the region in which to create the snapshot copy.
  3. then click “Copy snapshot” button on the right bottom conner.
  4. since I copied the snapshot to ap-south-2, so the snapshot can be seen in that region

Snapshot to Volume

  1. to make volume from the copied snapshot, click right on the snapshot and choose “Create volume from the snapshot” aws-ebs-snapshot-to-vol
  2. then under the “Volume settings” you can configure some parameter and set the Availability Zone within the region (e.g. ap-south-2a, b, and c)

Recycle Bin

  1. from the “Snapshots” menu, click “Recycle Bin” on top bar (between refresh and Actions button)
  2. On the Recycle Bin page, click “Create retention rule” button
  3. Then below the “Create retention rule” form, set some parameters, then click “Create retention rule” button on the bottom right conner.
  4. Then check on the “Retention rules”, you should have one now.
  5. And then check on the “Resources”, you have no resources aws-ebs-recyclebin
  6. Then delete the snapshot
  7. refresh again the “Resources” page, now you must see the deleted snapshot there
  8. you can play around with “recover” button to bring snapshot back
Licensed under CC BY-NC-SA 4.0
comments powered by Disqus