Skip to main content

Command Palette

Search for a command to run...

[1.9] AWS EBS Snapshots and Recovery

Updated
4 min read
[1.9] AWS EBS Snapshots and Recovery
A

Motivated, teamwork-oriented, and responsible Data Analyst enthusiast with significant experience in increasing comprehension of reports and presentations by the average professional. Highly educated, possessing a bachelor's, and a professional certification in Google data analytics, Standard Machine learning, and statistics.

Imagine we’re a librarian managing a vast digital library. Our books are data, our shelves are EBS volumes, and our photocopier is the snapshot tool. But what happens when a book gets damaged, or someone accidentally tosses a rare manuscript? Let’s explore how AWS EBS snapshots, automation, and the Recycle Bin act as our library’s backup plan.


1. EBS Snapshots: The Photocopier for Our Digital Books

Every librarian needs a way to preserve books. EBS snapshots are like making photocopies of our most important pages, but smarter.

How Snapshots Work

  • Incremental Backups: After the first full copy, snapshots only save changes made since the last snapshot. It’s like photocopying just the updated paragraphs in a book instead of reprinting the whole thing.

  • Encrypted by Default: If our original volume is encrypted (like a locked book vault), the snapshot copies stay locked too. Only those with the key can read them.

  • Shareable: Need to lend a copy to another librarian? Share snapshots across accounts - but if they’re encrypted, we’ll need to share the key too.

When to Photocopy

  • While Books Are Checked Out: Snapshots can be taken while volumes are in use, but for a perfect copy, pause writes or unmount the volume first.

  • Multi-Volume Snapshots: For complex setups (e.g., a series of encyclopaedias), snapshots capture all volumes at the same moment, ensuring consistency.


2. Creating Our First Snapshot: A Librarian’s Step-by-Step

Let’s make our first photocopy. Here’s how to create an EBS snapshot manually:

Step 1: Visit the Copy Room (EC2 Console)

  1. Navigate to Snapshots: In the EC2 console, click “Snapshots” > “Create snapshot”.

  2. Choose our Book (Volume): Select the volume to back up. If it’s encrypted, our snapshot inherits the lock.

  3. Add Notes (Tags): Label our snapshot with tags like “Finance-DB-March” for easy sorting.

Step 2: Restore a Lost Book (Create Volume from Snapshot)

  1. Go to Volumes: Click “Create volume” and select our snapshot.

  2. Pick a Shelf (Availability Zone): Restore the volume in the same zone as our instance.

  3. Adjust Size/Type: Need a bigger shelf? Resize the volume or switch to a faster storage type (e.g., gp3 to io2).

Pro Tip: New volumes load data lazily. It’s like having a placeholder book - pages fetch from S3 when someone opens it.


3. Automating Photocopies: Hire a Robot Librarian

Manually photocopying daily is tedious. Automate snapshots using Amazon Data Lifecycle Manager (DLM):

Set Up a Photocopy Schedule

  1. Define Rules:

    • Frequency: Daily, weekly, or monthly.

    • Retention: Keep copies for 30 days, 6 months, etc.

  2. Apply Tags: Automatically tag snapshots as “Daily-Backup” or “Monthly-Archive.

  3. Multi-Volume Support: Automatically snapshot all volumes attached to an instance at once.

Why Automate?

  • Disaster Recovery: If a fire (server crash) destroys our library, rebuild from yesterday’s snapshots.

  • Cost-Efficient: Only store changed pages (blocks), reducing storage fees.


4. The Recycle Bin: Rescue Accidentally Tossed Books

Even librarians make mistakes. The EBS Recycle Bin stops “deleted” snapshots from vanishing forever.

How the Bin Works

  • Retention Rules: Set how long snapshots stay in the bin (e.g., 7 days). After that, they’re shredded.

  • Recovery: Restore snapshots with one click - no need to dig through trash.

  • Tag or Region Filters: Protect all snapshots in a region or just tagged ones (e.g., “Critical”).

Real-World Use Cases

  • Oops, Wrong Delete: A junior librarian deletes the “Customer-DB” snapshot. Retrieve it from the bin within 24 hours.

  • Ransomware Attack: Malware deletes backups? Restore from the Recycle Bin before the retention period ends.


Putting It All Together: A Day in the Life of a Cloud Librarian

Scenario: Expanding the Fantasy Section

  1. Snapshot Before Changes: Before adding 100 new fantasy novels, take a manual snapshot tagged “Pre-Expansion”.

  2. Automate Weekly Backups: Use DLM to snapshot every Friday, retained for 3 months.

  3. Accidental Deletion: Someone deletes the “Fantasy-2024” snapshot. Restore it from the Recycle Bin.

  4. Disaster Strikes: A server crash corrupts the volume. Rebuild it from yesterday’s automated snapshot.


Conclusion: Build a Resilient Digital Library

Managing EBS snapshots is like running a modern library:

  • Snapshots are our photocopies - efficient and encrypted.

  • Automation is the robot librarian working nights.

  • Recycle Bin is our safety net.