A clean, self-contained admin UI on top of spatie/laravel-backup. List your backups per disk, run full / database-only / files-only backups, download or delete archives, clean up old backups, and review your backup configuration — all from the browser.
- PHP
^8.4 - Laravel
^11.0,^12.0or^13.0 -
spatie/laravel-backup^10.3(pulled in automatically as a dependency)
Follow the steps below to get the UI running end to end.
composer require aprendible/backup-uiThe service provider is registered automatically via package discovery — no manual config/app.php changes are required.
php artisan backup-ui:installThe wizard will:
- Publish the
spatie/laravel-backupconfig (config/backup.php) and the package config (config/backup-ui.php). - Ask for your application/backup name, the databases to back up, and the destination disks.
- Ask how many days to keep all backups, an optional notification email, and the daily times for the backup and cleanup schedules.
- Patch
config/backup.phpwith your answers and, if a chosen disk does not exist, offer to create it inconfig/filesystems.php.
Prefer to configure things by hand? Skip the wizard and publish the config on its own:
php artisan vendor:publish --tag="backup-ui-config"
This is the contents of the published config/backup-ui.php file:
return [
// The Gate used to authorize access to the UI. Defaults to "backup-access".
'gate' => null,
// Whether the package registers the daily backup / cleanup scheduled tasks.
'schedule' => [
'backup' => true,
'clean' => true,
],
// Where the UI is mounted and which middleware guards it.
'routes' => [
'prefix' => 'backup',
'middleware' => ['web'],
],
];The UI is protected by a Gate named backup-access (see Authorization below). Until you define it, every request returns 403. Add it to your AppServiceProvider::boot():
use Illuminate\Support\Facades\Gate;
Gate::define('backup-access', fn ($user) => in_array($user->email, [
'admin@example.com',
]));The package registers a daily backup:run and backup:clean. For those to fire, your app's scheduler must be running. In local development:
php artisan schedule:workIn production, add the single Laravel cron entry (* * * * * php artisan schedule:run) if you have not already.
Log in as a user the gate allows and open /backup (or your configured prefix). You're done — the stylesheet is compiled and self-hosted, so there is no front-end build step in your application.
php artisan vendor:publish --tag="backup-ui-views"The UI is protected by a Gate. By default it looks for a gate named backup-access (override the name via the gate config key). Define it in your AppServiceProvider:
use Illuminate\Support\Facades\Gate;
public function boot(): void
{
Gate::define('backup-access', function ($user) {
return in_array($user->email, [
'admin@example.com',
]);
});
}If no matching gate is defined, the UI returns 403 for every request.
Once installed, visit /backup (or your configured prefix) while authenticated as a user the gate allows. From there you can:
- View every backup grouped by destination disk, with reachability and used storage.
- Run a full, database-only, or files-only backup.
- Download or delete individual backups.
- Clean up old backups using your configured strategy.
- Review the resolved backup, schedule, cleanup and notification settings.
When schedule.backup is enabled the package registers a daily backup:run at 01:00, and when schedule.clean is enabled a daily backup:clean at 00:30. Make sure your application runs the Laravel scheduler:
php artisan schedule:workcomposer testPlease see CHANGELOG for more information on what has changed recently.
The MIT License (MIT). Please see License File for more information.