Repository navigation
Added
- Optional built-in UI (jiannius/atom + Livewire): start a queued database backup, see the archives and their status, download an archive. Off by default (
BACKUP_UI_ENABLED); configured by the newuiblock inconfig/backup.php. - Consumer hooks on the
backup()singleton:auth()(who can reach the UI; default allows thelocalenvironment only),beforeRunning()andbeforeDownloading()(for audit logging or extra checks; throw or abort to block). backup()->run()takes an optional trailingbool $runHooks = true.RunBackupqueued job and a cache-backed run status (no migrations). Each run has an id; only the run that owns the lock can release it or write its status.ui.download_expiry/BACKUP_UI_DOWNLOAD_EXPIRY(default 5 minutes): lifetime of the link a UI download redirects to, separate fromdownload.expiry.backup()->list()andListBackupstake an optional$withUrlsargument (defaulttrue;falseskips building the temporary URLs).- README: "Built-in UI" and "Restoring a copy locally" sections.
Changed
jiannius/atom^3 (which brings Livewire 4) is now a required dependency, even if you only use the CLI.beforeRunninghooks also fire forbackup:run, the scheduler and programmatic runs. Nothing happens until a hook is registered. A hook that throws or aborts blocks the run and is logged and emailed like any other failure.- Archives are now matched exactly as
{app-slug}-YYYY-MM-DD-HHMMSS.zip. Before,{app-slug}-*.zipalso matched another app's archives (acmevsacme-staging), whichbackup:list, UI downloads and pruning could then touch.
Fixed
- The UI is disabled for real: with
ui.enabledoff the routes (and Livewire update requests) answer 404. An emptyui.pathfalls back tobackupsinstead of serving the page at/. - The status of a finished run fades (completed after 1 hour, failed after 24 hours) and a failed run shows only a short, single-line error on the page.
Upgrade notes
jiannius/atomis now required even if you only use the CLI, and its service provider boots in every app that installs this package. Atom brings an app-wide immutablenow()(through its Carbon setup),Builder/Request/Str/Arrmacros, a globalPOST /atom/action/{name}route and a Blade precompiler. Check these against your app before upgrading.- Without the UI there is nothing to configure. To use it, see "Built-in UI" in the README (shared cache, a real queue worker, Tailwind scanning, a named
loginroute).
Upgrading
Require ^0.3. No action is needed unless you want the UI.