Version 2.6.0
Breaking change for custom target drivers:
TargetInterface::list()now takes astring $kind = self::KIND_BACKUPparameter. A driver registered throughEVENT_REGISTER_TARGET_DRIVERSthat still declareslist(): arraycauses a fatal error after the update. Add the parameter and return only the files of that kind:KIND_BACKUP,KIND_SANITIZED, orKIND_CRAFT. The built-inlocalandsftpdrivers are already updated.
Added
- Sanitized copies: a database dump with personal data replaced by fake values and secrets removed, for developers and staging. Create one with
php craft backup/sanitizeor the new Sanitized copy button in the Backups utility. Users, addresses, the search index, sessions, tokens, and two-factor tables are covered without config. Thesanitizeconfig block adds rules for custom fields by handle, other tables, and tables to empty. Each target keeps only the newest copy, which appears under Backups by target with a Sanitized badge. See the README for how it works and what it doesn't cover. - A collapsed Sanitized copy card in the Backups utility shows what a sanitized copy does with the current config: the targets that receive it, the user columns, password, and kept users, the rewritten tables and custom fields, and the emptied tables. It checks the rules against the database and warns about tables, columns, fields, and targets that don't exist.
- Backups by target also lists the dumps from Craft's own Backup button, with a Craft badge and a download. Retention and health checks ignore them.
Changed
- Requires
fakerphp/faker. TargetInterface::list()takes a$kindparameter, so targets can list sanitized copies and Craft's own dumps next to backups. See the breaking change note in this section.EVENT_ARCHIVE_CREATEDalso fires for sanitized copies, with$event->kindset tosanitized. Sanitized copies fire no other run events.
Version 2.5.0
Added
- Events as extension points.
BackupRunnerfiresEVENT_BEFORE_RUN,EVENT_BEFORE_DB_DUMP,EVENT_ARCHIVE_CREATED,EVENT_AFTER_CLEANUP,EVENT_CLEANUP_FAILED,EVENT_AFTER_RUN,EVENT_RUN_FAILED, andEVENT_LOW_DISK_SPACE. Handlers can cancel a whole run or the dump of one database connection. See the README for the payloads and examples. EVENT_REGISTER_TARGET_DRIVERSregisters target drivers of your own, or replaces a built-in one. Runs,backup/clean,backup/list,backup/monitor, and the Backups utility all use the registered drivers.BackupResult::$skippedtells whether an event handler canceled the run.backup/runthen prints "Skipped by an event handler." and exits with 0.
Changed
- Mail, Slack, Discord, and webhook notifications are sent from listeners on
EVENT_AFTER_RUNandEVENT_LOW_DISK_SPACEinstead of from inside the runner. backup/cleancleans the remaining targets when one target fails, and reports every failure at the end.
Deprecated
BackupRunner::list(). UseBackupRunner::status(), which also returns disk usage and an error per target.list()now returns an empty list for a target that fails instead of throwing.
Fixed
- One target with a broken config, such as a missing SFTP host or an unknown driver, no longer stops uploads and retention on the other targets.
backup/listand the Backups utility show the error for that target and list the others.
Version 2.4.0
Added
- Discord notifications. Set
BACKUP_DISCORD_WEBHOOK_URLto post an embed with a colored sidebar (green for success, red for failure, amber for low disk space), the run ID, duration, size, per-target results, and errors. Messages show the Craft Backup logo as avatar. Thenotifications.discordblock takesusername,avatar_url, and the same per-event toggles as Slack. - JSON webhook notifications. Set
BACKUP_WEBHOOK_URLto receive a versioned JSON document ("schema": 1) for every enabled event. WithBACKUP_WEBHOOK_SECRET, each request carries anX-Craft-Backup-Signatureheader with an HMAC-SHA256 of the body. See the README for the payload and how to verify the signature. - Discord and the webhook appear on the Notifications card, each with a "Send test notification" link.
- Optional
host_fingerprintfor SFTP targets. When it's set, uploads fail if the server's host key doesn't match. When it's missing, every run logs a warning.
Changed
- Notification messages list archive file names instead of absolute paths on the server, and show sizes in KB, MB, or GB.
- Requires
league/flysystem-sftp-v33.36 or later, the first version that accepts OpenSSHSHA256:fingerprints.
Fixed
- When a Slack notification failed, the logged error and the reply to "Send test notification" contained the full webhook URL, including its secret token. Delivery errors from all HTTP channels now show only the scheme, host, and port.
- Included files in a folder whose path starts with the project root's path, such as
/var/www2next to a root of/var/www, were stored under a mangled path like2/...inside the archive. They now keep their full path, like any other file outside the project root.
Version 2.3.5
Heads-up: Retention now keeps more backups than before, so targets use more disk after the update. If you rely on
delete_oldest_backups_when_using_more_megabytes_than, check that the cap still fits.
Fixed
- Retention kept about 11 months of history with the default settings instead of the documented ~2.5 years. Each range now starts where the newer one ends: daily after
keep_all_for_days, weekly after daily, then monthly and yearly. The newest backup is never deleted, even when it is older than every range. - Retention,
backup/list,backup/monitor, and the Backups utility only consider archives whose filename starts with the configuredname. Before, sites sharing a target root pruned each other's backups and counted them toward their own health checks, and the local target could prune.zipfiles written by Craft's owndb/backup --zip. Sites that share a root need differentnamevalues. After changingname, archives written under the old name are no longer listed, pruned, or monitored. - Uploads are written to a
.partfile and renamed once complete, so an interrupted upload no longer leaves a truncated archive that counts as the newest backup. Retention now skips targets whose upload failed in the same run. - An encryption or archiving error no longer leaves an unencrypted archive in
storage/runtime/temp/craft-backup/. Archives are built inside the per-run folder, which is removed after every run. Anencryption.keythat is not base64-encoded 32 bytes now fails config validation before the database dump starts. - The Backups utility card endpoints and the Slack test action now require the Backups utility permission instead of control panel access only.
Version 2.3.4
Fixed
- DB dumps no longer leave a copy in
storage/backups/.DbDumperpreviously called Craft's$db->backup(), which always writes tostorage/backups/{sitename}--{date}--{version}.sqlfirst, then renamed the file into staging — leaving an orphan whenever the rename failed silently or the run was interrupted between the two calls. It now calls$db->backupTo($target)to write the dump straight into the staging directory.
Version 2.3.3
Fixed
- Archives left behind in
storage/runtime/temp/craft-backup/after every run. The runner removed the per-run staging subdirectory but not the archive file itself, which sits one level up; it's now unlinked in the samefinallyblock. Dry runs still preserve the archive so its path stays inspectable.
Version 2.3.2
Fixed
- Suppressed
Attempting to set settings on a plugin that doesn't have settings: backupwarnings logged on every request. Craft auto-mergesconfig/backup.phpinto plugin settings and callssetSettings()during plugin construction; since the plugin loads its config independently viaBackupConfig::load()and defines no settings model,Plugin::setSettings()is now a no-op.
Version 2.3.1
Fixed
- Project config now overrides bundled defaults predictably for list-shaped values. Previously
yii\helpers\ArrayHelper::mergeappended numeric-indexed lists, so a projectmonitor_backupsrule was added on top of the bundled default rule (causing duplicate per-target check rows) and projectsource.include/excludepaths inherited the bundled paths alongside their own. Lists now replace wholesale; maps still merge by key.
Version 2.3.0
Added
- New
source.split_db_and_filesconfig option. When enabled, each run produces two archives — one containing the database dumps, one containing the included files — instead of a single combined archive. Both archives share a runId in their filenames (e.g.…-a1b2c3d4-db.zipand…-a1b2c3d4-files.zip) and are treated as one logical backup by retention (GFS bucketing, size cap) and health checks (min_number_of_backups).
Changed
BackupResult::$archivePath(single, nullable) replaced byBackupResult::$archivePaths(list). One entry for combined runs, two for split runs.
Version 2.2.0
Added
- Craft CMS 4 support. The plugin now installs on Craft 4.4+ and Craft 5, on PHP 8.1+.
Version 2.1.0
Added
- Per-row "Download" button on the "Backups by target" card for
localtargets. Clicking streams the backup file to the browser via a CSRF-protected POST. Gated by a newbackup:downloaduser permission (admins pass automatically); the button is hidden for users without the permission and for non-localtargets. - New
downloadconfig block withmax_bytes(default'500MB'),x_send_file, andx_send_file_uri_prefix. Files larger thanmax_bytesrender the download control disabled with a tooltip showing the absolute on-server path so admins can fetch via SCP/SFTP. Settingx_send_fileto'X-Sendfile'(Apache) or'X-Accel-Redirect'(nginx) hands the response off to the web server, bypasses the size cap, and frees the PHP-FPM worker immediately.
Version 2.0.2
Changed
- Timestamps in the "Backup health" and "Backups by target" cards now render as a localized relative time (e.g. "2 hours ago") via Carbon's
diffForHumans(), with the previously-shown absolute date surfaced as an instant tooltip on hover.
Version 2.0.1
Added
- "Notifications" card on the Backup utility, collapsed by default. Lists each configured channel (mail, Slack) with the events it fires on — recipients per event for mail, enabled/disabled per event for Slack — plus the Slack channel override when set. The card hides itself entirely when no notification channels are configured.
- "Send test notification" link in the Slack row that posts a test message to the configured webhook, ignoring per-event flags. Used to confirm setup or debug silence.
Version 2.0.0
⚠️ Breaking change. Notification config has moved out of
logginginto a new top-levelnotificationsblock. Update yourconfig/backup.php:
logging.notify_on_failure→notifications.mail.on_failurelogging.notify_on_success→notifications.mail.on_successlogging.notify_on_low_disk_space→notifications.mail.on_low_disk_space
Added
- Slack notifications via Incoming Webhooks. Configure under
notifications.slackwithwebhook_url(also overridable viaBACKUP_SLACK_WEBHOOK_URL), optionalchannel/username/icon, and per-eventon_failure/on_success/on_low_disk_spacetoggles. Slack receives the same content as the corresponding mail notification.
Changed
- Notification config moved from
logging.notify_on_*tonotifications.mail.on_*(see breaking-change note above).
Version 1.2.12
Added
- "Backups by target" disk usage bar now overlays a darker first segment showing how much of the volume's used space is taken up by the listed backup files, with a matching size in the legend (e.g.
8.42 GB backups).
Version 1.2.11
Added
- Optional
retention.delete_oldest_backups_when_using_more_megabytes_than: hard size cap, in megabytes, applied after the GFS rules. If the total size of the kept backups exceeds the cap, the oldest are pruned one by one until the total fits. The newest backup is always retained, even if it alone exceeds the cap. Set tonullto disable.
Version 1.2.10
Changed
- Moved the per-target disk usage row to the bottom of the "Backups by target" card, separated from the file table and lock legend by a hairline divider so it reads as card metadata rather than a header.
Version 1.2.9
Added
warn_when_disk_space_is_lower_thannow also accepts a percentage of total disk (e.g.'20%','12.5%') in addition to absolute byte counts and shorthand. The "Backups by target" card surfaces the percent next to the resolved bytes in the legend and threshold marker tooltip (e.g.warn below 11.22 GB free (20%)).
Version 1.2.8
Added
- Per-target disk usage bar above each tab in the "Backups by target" card, showing used/free space. Optional
warn_when_disk_space_is_lower_thanpermonitor_backupsrule (e.g.'5GB','500MB', or a percentage like'20%') draws a warn marker on the bar and turns it red once free space drops below the threshold. Only thelocaldriver reports disk usage. logging.notify_on_low_disk_space: email recipients alerted after a backup run if any target's free space fell below its configured warn threshold.
Changed
- Renamed the Utilities entry from "Backup" to "Backups".
Version 1.2.7
Changed
- Backups-by-target table now also shows a grey open-lock icon for
.zipfiles that are not password protected. On local target tabs the legend explains both lock states; non-local tabs only show the "zip detection is available for local targets only" note, so a missing icon no longer reads as "encryption unknown".
Version 1.2.6
Added
- Per-target checks card now expands to reveal each individual check (target reachable, minimum backup count, youngest backup age) with pass/fail/skipped state. Failing targets auto-expand.
- "Show checks" toggle on the Backup health card surfaces high-level signals: monitoring configured, last run recorded, last run succeeded, a successful backup exists, all targets healthy.
- German translations (
src/translations/de/backup.php) covering the full string catalog.
Changed
BackupMonitornow evaluates every configured check independently instead of bailing on first failure, and routes user-facing labels and reasons throughCraft::t('backup', …)so the UI and./craft backup/monitorJSON output respect the active language.- Duration formatting in monitor results uses integer-only composites (
3h 12min,2d 4h) instead of decimal hours/days like2.1h. - Backups-by-target table capped at 6.5 visible rows so the half-cut row hints at scrollability.
- Renamed the table column "Modified" to "Created" — backup files are written once, so the file's mtime is effectively its creation time.
Version 1.2.5
Added
- Green lock icon next to password-protected
.zipfiles in the "Backups by target" card, with a legend explaining that detection is available for local targets only.
Version 1.2.4
Added
- Optional
date_time_formatconfig value applied to the timestamps shown in the "Backup health" and "Backups by target" cards.
Changed
- Tightened status badge layout in the Backup utility cards so badges no longer hang-indent when wrapping and per-target check badges only take the width they need.
Version 1.2.3
Changed
- Deferred per-card data loading on the status page so it now renders immediately with skeleton placeholders and isolates failures to individual cards.
Version 1.2.2
Changed
- Renamed plugin to "Backup".
- Updated plugin icon.
- Moved backup health overview from a dedicated control panel section into a utility under Utilities.
- Reworked the status page layout into single cards and adjusted styling.
Version 1.2.1
Security
- Pinned
phpseclib/phpseclibto^3.0.51to pick up upstream security fixes.
Version 1.2.0
Added
- Control panel status page showing last/next run, recent results, and per-target health.
BackupMonitorhealth checks surfaced in the UI (translations, templates, asset bundle).RunStateStoreto persist run state for the status page.
Version 1.1.1
Added
- Health check documentation in the README.
Version 1.1.0
Added
backup/monitorconsole command for verifying that recent backups exist and meet freshness/size thresholds, including notifications on failure.
Version 1.0.0
Initial release.
Added
- Console commands modelled after
spatie/laravel-backup:backup/runwith--only-db,--only-files,--only-to,--disable-cleanup,--dry-runbackup/listbackup/cleanwith--only-to,--dry-runbackup/publish-configbackup/decrypt
- Target drivers:
localandsftp(vialeague/flysystem-sftp-v3). Multiple targets per run, retention applied per target independently. - Archive containers:
zip(default, optional AES-256 password) andtar.gz(with optional custom AES-256-CBC + HMAC-SHA256 envelope). - Dependency-free
scripts/decrypt.phprecovery script. - Grandfather-Father-Son retention policy with configurable daily/weekly/monthly/yearly buckets.
- Mail notifications on success and failure via Craft's mailer.
- Optional upload throttling via streaming stream filter.
- Env-var overrides for all sensitive config keys (
BACKUP_NAME,BACKUP_ARCHIVE_PASSWORD,BACKUP_ENCRYPTION_ENABLED,BACKUP_ENCRYPTION_KEY,BACKUP_SFTP_*).