Jump to content

Recommended Posts

Posted

Hi everyone,

Every site I've launched eventually had a database incident — corrupted table, failed migration, bad deploy. Having a reliable backup system that runs automatically and stores offsite is non-negotiable. This module is what I use in production.

GitHub: https://github.com/mxmsmnv/ProcessDbBackup

ProcessDbBackup.thumb.png.0822256814ac0157112f9e0b679e522e.png

What it does:

  • Three independent backup types — Regular, Weekly, Monthly — each with its own LazyCron schedule and retention count
  • Admin home widget — shows status (🟢 OK / 🟡 Outdated / 🔴 No backups) per type with "Create now" buttons
  • Backblaze B2 upload — optional offsite storage after every backup, keep or delete local copy
  • Chunked upload — upload .sql.gz from your computer in 2MB chunks, bypasses upload_max_filesize entirely
  • Streaming restore — reads .gz line-by-line, flat memory usage regardless of dump size
  • Partial restore — select individual tables from a backup
  • Pre-restore auto-backup — safety backup of current DB before any restore
  • Backup integrity verification — gzip check + SQL structure validation
  • Lock file — prevents concurrent backup processes
  • Exclude tables — skip cache, sessions etc. from all backups
  • Storage protected with .htaccess deny-all

Backup methods: mysqldump (preferred, InnoDB-safe hot backup) with PHP PDO fallback. Restore via mysql CLI with PHP PDO streaming fallback.

Requirements: ProcessWire 3.0+, PHP 8.0+, zlib, PDO. mysqldump/mysql CLI optional but recommended for large databases.

MIT License.

  • Like 6
  • Thanks 2

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...