Step 05 of 8 Hours to days (volume-dependent)· advanced
Step 5: Backfill Historical Data
Bulk-copy all historical data into target. The sync from Phase 4 keeps it current after this point.
Recommended prompts
Use one of these to do the work in your IDE
Open the template to read it in full. Click Copy prompt to grab it (with your stack values pre-filled where they apply) — then paste into Claude Code, Cursor, or wherever you build.
Recommended skills
Drop these into Claude Code for this phase
Skills auto-trigger on the right kind of request. Install once; they apply to every prompt that fits.
Recommended MCP configs
Wire these tools into Claude Code first
MCP servers give Claude Code direct access to external systems (Jira, browsers, databases). Configure once.
When you're done
Verify these in your own work before moving on
This is a checklist for you to mentally tick off in your repo and IDE — the site doesn't track it, you do.
- Backfill complete
- Row counts match source (within tolerance)
- Aggregate sums match
- Sample row spot-checks passed (50+ random rows per table compared field-by-field)
- FK integrity preserved (no orphans introduced)
- Indexes in place on target
- Statistics updated on target
- Performance validated (top 20 hot queries tested)
Common pitfalls
What goes wrong at this step
- Sequential single-threaded copy of large tables — chunk and parallelize
- Loading data before creating indexes — usually right (faster), but means queries are slow during the load window
- Statistics not updated — query planner makes bad decisions until ANALYZE runs
- Forgetting to reset sequences — auto-increment columns must continue past the max source value