From ab3a3c10af16ff107347c7b82c74e215e78ccc9d Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Wed, 26 Jun 2024 22:35:52 +0200 Subject: [PATCH] chore(kb/ebs): add section about snapshots --- knowledge base/cloud computing/aws/ebs.md | 28 ++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/knowledge base/cloud computing/aws/ebs.md b/knowledge base/cloud computing/aws/ebs.md index 38f7608..1c01c07 100644 --- a/knowledge base/cloud computing/aws/ebs.md +++ b/knowledge base/cloud computing/aws/ebs.md @@ -3,6 +3,7 @@ Persistent [block storage][what is block storage?] for [EC2 Instances][ec2]. 1. [TL;DR](#tldr) +1. [Snapshots](#snapshots) 1. [Further readings](#further-readings) 1. [Sources](#sources) @@ -13,18 +14,36 @@ Persistent [block storage][what is block storage?] for [EC2 Instances][ec2]. ```sh # Clean up unused volumes. -aws ec2 describe-volumes --output 'text' \ - --filters 'Name=status,Values=available' --query 'Volumes[].VolumeId' \ +aws ec2 describe-volumes --output 'text' --filters 'Name=status,Values=available' \ + --query "Volumes[?CreateTime<'2018-03-31'].VolumeId" \ | xargs -pn '1' aws ec2 delete-volume --volume-id ``` +## Snapshots + +When created, snapshots are **incremental**.
+Incremental snapshots are stored in EBS' standard tier. + +Snapshots can be [archived][archive amazon ebs snapshots] to save money should they **not** need frequent nor fast +retrieval.
+When archived, incremental snapshots are converted to **full snapshots** and moved to EBS' archive tier. + +> The minimum archive period is 90 days.
+> If deleting or permanently restoring an archived snapshot before the minimum archive period, one is billed for all the +> remaining days in the archive tier, rounded to the nearest hour. + +When access to archived snapshots is needed, they need to be restored to the standard tier before use. Restoring can +take **up to 72h**. + ## Further readings - [Amazon Web Services] - [What is block storage?] - AWS' [CLI] +- [Archive Amazon EBS snapshots] +- [Automate snapshot lifecycles] ### Sources @@ -34,7 +53,8 @@ aws ec2 describe-volumes --output 'text' \ - [`delete-volume`][delete-volume] @@ -43,6 +63,8 @@ aws ec2 describe-volumes --output 'text' \ [ec2]: ec2.md +[archive amazon ebs snapshots]: https://docs.aws.amazon.com/ebs/latest/userguide/snapshot-archive.html +[automate snapshot lifecycles]: https://docs.aws.amazon.com/ebs/latest/userguide/snapshot-ami-policy.html [delete-volume]: https://docs.aws.amazon.com/cli/latest/reference/ec2/delete-volume.html [describe-volumes]: https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-volumes.html [documentation]: https://docs.aws.amazon.com/ebs/