1
Differential Backups
Jonathan Miller edited this page 2026-06-02 19:02:26 -05:00

Differential Backups

Differential backups only include files that changed since the last full backup, dramatically reducing size and time for large sites.

How It Works

  1. Full backup creates a file manifest (path + size + mtime for every file) and stores it in the backup record
  2. Differential backup loads the most recent full backup's manifest and compares it against the current filesystem
  3. Only new or modified files are included in the differential archive
  4. The database is always fully dumped (no incremental DB support)

Setting Up

  1. Create a profile with type Full — run this on a weekly schedule
  2. Create a profile with type Differential — run this daily or hourly
  3. Both profiles should use the same exclusion filters for consistency

Restore from Differential

To restore to a specific point in time:

  1. Restore the base full backup first
  2. Then restore the differential backup on top

The differential archive only contains changed files, so the full backup provides the complete base.

Fallback Behavior

If no full backup with a manifest exists for the profile, a differential backup automatically runs as a full backup instead. This ensures the first run always creates a usable base.

Manifest Storage

The manifest is stored as JSON in the manifest column of #__mokobackup_records. It contains:

{
  "path/to/file.php": {"size": 1234, "mtime": 1717350000},
  "images/logo.png": {"size": 56789, "mtime": 1717340000}
}

Only full backups store manifests. Differential backups reference the most recent full backup's manifest for comparison.