alfasix / alfakit-backup
Manage spatie/laravel-backup backups from an AlfaKit panel: list backups per disk with their health, create, download and delete them.
Requires
- php: ^8.3
- alfasix/alfakit: ^0.1|@dev
- spatie/laravel-backup: ^10.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
by Alfa Six
Spatie Laravel Backup for AlfaKit panels: a Backups page that lists the backups of every destination disk with the destinations' health, creates backups in the background, and downloads and deletes them. It renders in React, Vue and Svelte with AlfaKit's built-in components.
Installation
composer require alfasix/alfakit-backup
Install and configure spatie/laravel-backup (config/backup.php), run a queue worker, and register the plugin:
use AlfaSix\AlfakitBackup\BackupPlugin; $panel->plugin( BackupPlugin::make() ->usingQueue('backups') ->usingPollingInterval('10s') ->authorize(fn (User $user): bool => $user->is_admin), );
The page is at /{panel}/backups.
Usage
- Create backup queues
CreateBackupJob(database and files, database only or files only), which runsbackup:run. - Download opens a temporary signed link that streams the archive (
downloadLinkLifetime(), 5 minutes by default). - Delete removes the archive from its disk.
- A card per destination shows whether it is healthy (spatie's monitor health checks), the number of backups, the storage used and the newest backup.
Other options: usingPage(), timeout(), noTimeout(), navigationGroup(), navigationLabel(), navigationIcon(), navigationSort(), registerNavigation(). See the documentation.
License
MIT. See LICENSE.md.