reph

Templates · Engineering

Migration plan template

Move data or systems safely with checkpoints and rollback

Start with this template →Sign in

Opens on reph with the template ready to start. No account needed; sign in to keep your document.

Use it when

You are moving data or traffic between systems and need checkpoints, verification and a rollback everyone has agreed on

Who it's for

EngineerTech leadSRE

Filled example

The template filled in for a made-up company, so you can see what good looks like.

Move file attachments from NFS to object storage

Author: Leo Marchetti · Date: 2026-07-06

Goal & scope

Move all 38 million customer attachments (21 TB) from the shared NFS volume to S3-compatible object storage, and switch the app to read and write there. Out of scope: thumbnails (regenerated on demand) and the legacy export archive.

Current vs target state

Mermaid diagram (drawn as a picture in reph)
flowchart LR
  subgraph Current
    A[App servers] --> N[NFS volume]
  end
  subgraph Target
    B[App servers] --> S[Object storage]
    S --> C[CDN]
  end
  N -- backfill --> S

Phases

Phase Steps Exit criteria
1. Prepare Create buckets, IAM, lifecycle rules Write test passes from every app node
2. Dual-write New uploads go to both stores 7 days with zero dual-write errors
3. Backfill Copy historical files in key order 100% copied, checksums match
4. Cutover Flip reads to object storage 48 hours with error rate under 0.01%
5. Decommission old Unmount NFS, keep snapshot 30 days Finance confirms storage contract ended

Dual-write / backfill strategy

The upload handler writes NFS first, then object storage, and records failures in a retry table. The backfill job copies files oldest first at up to 40 files per second, throttled when NFS latency passes 50 ms.

Verification

Nightly job compares object count and SHA-256 for a 1% random sample, plus a full count per customer. Shadow reads fetch from both stores for 5% of downloads and log mismatches.

Progress

Rows backfilled
72%
▲ +18%
Parity mismatches
3
▼ -80%
Shadow-read p99
84 ms

Rollback plan

Trigger: download error rate above 0.5% for 10 minutes, or any confirmed missing file. Steps: flip the attachments_read_source flag back to nfs (takes effect in under a minute), keep dual-write on, and open an incident. NFS stays authoritative until phase 5.

Communication

  • Support and customer success: two weeks' notice, with a macro for "file not found" reports
  • Status updates in #eng-migrations every weekday at 10:00 during phases 3 and 4

Timeline

Mermaid diagram (drawn as a picture in reph)
gantt
  dateFormat YYYY-MM-DD
  title Attachments migration
  section Prepare
  Prepare            :p1, 2026-07-13, 5d
  section Move
  Dual-write         :p2, after p1, 7d
  Backfill           :p3, after p2, 14d
  Cutover            :milestone, p4, after p3, 1d
  section Clean up
  Decommission old   :p5, after p4, 30d
Milestone Date
Dual-write on 2026-07-18
Backfill complete 2026-08-07
Cutover 2026-08-08
NFS decommissioned 2026-09-08

Risks

Risk Mitigation
Backfill slows production NFS Throttle on latency, run hardest batches overnight
Filenames with unusual characters break keys Keys are content hashes; names live in the database

The template

Show the blank template

Migration plan

Author: [your name] · Date: [date]

Goal & scope

What's moving (data, service, dependency) from where to where, and what's explicitly not included.

Current vs target state

Mermaid diagram (drawn as a picture in reph)
flowchart LR
  subgraph Current
    A[Old system]
  end
  subgraph Target
    B[New system]
  end
  A -- migration --> B

Phases

Phase Steps Exit criteria
1. Prepare
2. Dual-write
3. Backfill
4. Cutover
5. Decommission old

Dual-write / backfill strategy

How writes stay consistent across both systems during migration, and how the backfill catches up historical data without locking production tables.

Verification

How you'll prove the target holds the same data as the source before cutting over: row counts, checksums, shadow reads.

Progress

Update during the migration window so anyone can see where it stands without asking.

Rows backfilled
0%
▲ +0%
Parity mismatches
0
▲ 0%
Shadow-read p99
0 ms

Rollback plan

The exact trigger for rolling back, and the steps. This must be as detailed as the forward plan.

Communication

  • Who needs advance notice, and by when
  • Status update cadence during the migration window

Timeline

Dates per phase. Leave slack between dual-write and cutover: that is where surprises show up.

Mermaid diagram (drawn as a picture in reph)
gantt
  dateFormat YYYY-MM-DD
  title Migration timeline
  section Prepare
  Prepare            :p1, 2026-01-05, 5d
  section Move
  Dual-write         :p2, after p1, 7d
  Backfill           :p3, after p2, 5d
  Cutover            :milestone, p4, after p3, 1d
  section Clean up
  Decommission old   :p5, after p4, 14d
Milestone Date

Risks

Risk Mitigation

Questions

Do I always need dual-write?
No, a short read-only window can be simpler for small datasets, say which you chose and why
When do I decommission the old system?
Only after the target has run as the source of truth through a full business cycle with no rollback
How detailed should the rollback be?
As detailed as the forward plan, with a named trigger and a person who can pull it

Fill it with your agent

Connect Claude to reph over MCP, then paste this. The draft arrives as suggestions you accept or reject section by section. How to connect Claude.

Find my reph doc "Migration plan" with search_docs, then read it with read_doc. Draft phases, exit criteria and rollback triggers from the schemas, data volumes, runbooks and tickets I link, and fill Verification with concrete checks such as row counts and checksums. File it with suggest_edit, one replace_section op per section (heading line kept) so each can be accepted alone. Ask each open question (unknown data volumes or phase owners) with add_comment quoting that section's heading line, then call request_review with a one-line summary.

Related templates

Start with this template →Sign in