Open-Source Laravel Package · 2026

Laravel Backfill

Overview

Laravel Backfill is an open-source package for running one-off data changes over large database tables safely. Each backfill is a class that defines which rows to process and what to do with each row, and it runs with a single Artisan command.

Every batch commits its changes, errors, and cursor position together, so a crashed or killed run resumes exactly where it stopped. The test suite runs against SQLite, MySQL 8.4, and PostgreSQL 18, including a chaos test that kills a run mid-batch and verifies that the resumed result matches an uninterrupted run.

Key features

  • Keyset pagination (WHERE id > ? ORDER BY id) that avoids the skipped rows of OFFSET-based chunking
  • Crash-safe, resumable runs with per-batch cursor persistence
  • Dry-run mode that shows real before/after diffs inside a rolled-back transaction, with mail, jobs, and HTTP intercepted
  • Per-row savepoints, recorded failures, retries, and a circuit breaker that pauses runs on systemic errors
  • Replication-lag throttling that shrinks batch size or pauses when replicas fall behind
  • Live dashboard with progress and throughput, plus an operator panel so support staff can run approved backfills without shell access
  • 4K+ downloads on Packagist

Built with

  • Laravel
  • PHP
  • Livewire
  • MySQL
  • PostgreSQL

More projects