Learning/Full-Stack Developer → Production Engineer/Lesson 12
Chapter 3·Lesson 4 of 4·30 min

3. Data & Persistence

Migrations, Backups & Recovery

Change database schemas safely and verify that backups can actually restore production data.

Lesson overview

Migrations are deployments for data. Prefer backward-compatible phases, safe backfills and reversible changes. Backups require tested restoration, retention policies and explicit recovery objectives.

Learning path

Theory → Example → Code → Practice → Quiz → Challenge → Completion

0/6 done

Step 1

Theory

Migrations are deployments for data. Prefer backward-compatible phases, safe backfills and reversible changes. Backups require tested restoration, retention policies and explicit recovery objectives.

Step 2

Example

To rename a large column, add the replacement, dual-write, backfill, switch reads, verify, then remove the old field in a later release.

Step 3

Code

sql
alter table users add column display_name text;
update users set display_name = name where display_name is null;

Step 4

Practice

Review your current application and apply Migrations, Backups & Recovery. Document the current behavior, one production risk, the change you would make, and how you would verify it.

Step 5

Quiz

1. What is the central production concern in "Migrations, Backups & Recovery"?

Step 6

Challenge

Design a production-ready implementation for Migrations, Backups & Recovery. Include failure handling, security considerations, observability, testing and a rollback or recovery path where applicable.

Complete every stage

Work through every step in order, then the lesson will be marked complete.

Each chapter and subtopic has its own public URL under /full-stack-to-production.