Laravel Backup Panel provides a dashboard for spatie/laravel-backup package.

Overview

Laravel Backup Panel

Latest Version on Packagist Build Status Tests Quality Score StyleCI Total Downloads

Laravel Backup Panel provides a dashboard for spatie/laravel-backup package. It lets you:

  • create a backup (full | only database | only files)
  • check the health of your backups
  • list all backups
  • download a backup
  • delete a backup
  • monitor used disk storage

Screenshot

It resembles the look and functionality of another Spatie package: spatie/nova-backup-tool. This was done on purpose, so users can easily migrate from one to another. Only it doesn't use polling. A "real-time" updates of a backups list isn't such a necessarily thing and an intensive polling can cause unexpected charges if you use services that require to pay per API requests, such as Google Cloud Storage. Also, some users reported about hitting a rate limit of Dropbox API.

Requirements

Make sure you meet the requirements for installing spatie/laravel-backup. Since this package requires the spatie/laravel-backup version 6.11.12 or higher, it also requires PHP 7.3 and Laravel 6.0 or higher.

Using an older version of PHP, Laravel, spatie/laravel-backup?

Just use the older version of this package, see the v1 branch.

Installation

First you must install spatie/laravel-backup into your Laravel app. The installation instructions are here. When successful, running php artisan backup:run on the terminal should create a backup and php artisan backup:list should return a list with an overview of all backup disks.

You may use composer to install Laravel Backup Panel into your project:

$ composer require pavel-mironchik/laravel-backup-panel

After installing, publish its resources using provided Artisan command:

$ php artisan laravel-backup-panel:install

This will do the following:

  • place CSS files into public/vendor/laravel_backup_panel directory
  • place Blade templates into resources/views/vendor/laravel_backup_panel directory
  • add config file config/laravel_backup_panel.php
  • register service provider app/Providers/LaravelBackupPanelServiceProvider.php

Updating

When updating the package, do not forget to re-publish resources:

$ php artisan vendor:publish --tag=laravel-backup-panel-assets --force
$ php artisan vendor:publish --tag=laravel-backup-panel-views --force

Upgrading

See the Wiki for the instructions how to upgrade from version 1.

Configuration

You are free to tune CSS styles in the public/vendor/laravel_backup_panel directory and change the layout in the resources/views/vendor/laravel_backup_panel directory as you want.

Laravel Backup Panel exposes a dashboard at /backup. Change it in config/laravel_backup_panel.php file:

'path' => 'backup',

Sometimes you don't want to run backup jobs on the same queue as user actions and things that is more time critical. Specify your desired queue name in config/laravel_backup_panel.php file:

'queue' => 'dedicated_low_priority_queue',

By default, you will only be able to access the dashboard in the local environment. To change that, modify authorization gate in the app/Providers/LaravelBackupPanelServiceProvider.php:

/**
 * Register the Laravel Backup Panel gate.
 *
 * This gate determines who can access Laravel Backup Panel in non-local environments.
 *
 * @return void
 */
protected function gate()
{
    Gate::define('viewLaravelBackupPanel', function ($user) {
        return in_array($user->email, [
            '[email protected]',
        ]);
    });
}

Usage

Open http://your-site/backup. You'll see a dashboard and controls to use.

Changelog

Please see CHANGELOG for more information about what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Testing

$ composer test

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Support

If you like this package, consider supporting it. You can use this in such ways:

  1. If you don't have a Digital Ocean account yet - use this link https://m.do.co/c/d9cd33e44510 to register one. You will get $100 in credit over 60 days, and once you spent $25 - I will get $25 too. This will cover the cost of hosting my nonprofit open-source projects there.
  2. If you have some Laravel/Vue project/work to be done, then contact me - [email protected]. I work as a freelancer (mostly at UpWork), and such a project can pay my bills.

And any other help will be appreciated.

Credits

License

The MIT License (MIT). Please see License File for more information.

Comments
  • Protect route /backup

    Protect route /backup

    Hi I would like protect the route /backup to only auth users. I have created a route in the web.php which has the routes of the project.

    Route::group([
        'middleware' => 'auth',
        'prefix'     => '/admin',
        'as'         => 'admin.'
    ], function () {
    
       Route::get('/backup', [BackupController::class, 'index'])->name("backup");
      ...
      ...
     other routes...
    
    });
    

    By the moment in local mode or debug mode any users that knows the route /backup can access and make backups, I have added that route and only works redirecting to login when the user go to /admin/backup, but if him go directly to /backup can access and does not matter if him did login, how I can prevent it?

    My idea after fix it create the roles and permissions using laravel spatie permission package and I need to create slugs to each permission like 'admin.backup', admin.user.index etc.. I don't wan restrict this route by using and email of the auth user my idea is restrict this route by using role and permissions but first I want restrict this route to only auth users, by the moment anyone hwo knows the route /backup can access and make backups.

    Update After write this issue, I fixed the problem. I found the file web.php inside of vendor->pavel-mironchik->laravel-backup-panel->routes->web.php and I added the middleware auth to default route:

    <?php
    use Illuminate\Support\Facades\Route;
    
    Route::view('/', 'laravel_backup_panel::layout')->middleware('auth')->name("backup.index");
    
    

    Of this way only auth users can access that route. Now Using the middleware 'can' for permissions I should do something like this:

    Route::view('/', 'laravel_backup_panel::layout')->middleware('can:admin.backup.index')->middleware('auth')->name("backup.index"); Of this way I think that only the users with the permission admin.backup.index could access to the routes /backup Is correct this? I'm not laravel expert, sorry. I think that it's correct because I have one inframe calling the route 'backup.index' and by the moment the access is restricted:

    image

    thanks so much.

    opened by alcarazolabs 15
  • The dump process failed with a none successful exitcode.

    The dump process failed with a none successful exitcode.

    Hello, thanks for the package. Am able to successfully create a files backup but when I try to create a database backup, I get

    Exitcode ======== 127: Command not found Output ====== <no output> Error Output ============ sh: mysqldump: command not found

    needs more info 
    opened by thehappytechie 8
  • Gate not working when also using spatie/laravel-permission

    Gate not working when also using spatie/laravel-permission

    There is a conflict when using spatie/laravel-permission alongside the Laravel Backup Panel production gate.

    Production gate works as expected on an app that doesn't use laravel-permission.

    I've tested on two separate apps using laravel-permission, and it always denies you, even when your email matches.

    needs more info 
    opened by sydney1 7
  • Possible bug : undefined Backup::size()

    Possible bug : undefined Backup::size()

    Hello, I installed the package with fresh Laravel 8.12, so I'm getting this error : Call to undefined method Spatie\Backup\BackupDestination\Backup::size() NB: the backup passes successfully but in the panel that error appears.

    bug 
    opened by AEK-BKF 6
  • Undefined constant

    Undefined constant "Spatie\Backup\Tasks\Backup\SIGINT"

    When I click on create update, I get the error: Undefined constant "Spatie\Backup\Tasks\Backup\SIGINT". I couldn't figure out, what is wrong.

    needs more info 
    opened by AkmalArzhang 4
  • Error when restoring a database after backup - pg_restore: error: input file appears to be a text format dump. Please use psql.

    Error when restoring a database after backup - pg_restore: error: input file appears to be a text format dump. Please use psql.

    Hi dear, After create one backup by using laravel backup panel and import it by using pgadmin because my database is a postgresql it throwed one error: pg_restore: error: input file appears to be a text format dump. Please use psql. My DB_CONNECTION is =pgsql Before I installed laravel backup from spatie v6. By the moment the backups are being done successfully but when I try to restore a database by using this backup pgadmin v4 is throwing the error of above.

    I don't know what to do, in local mode I'm working with mysql database but in production I'm using postgresql. This issue is with this package or with Laravel-backup from spatie.

    I will appreciate any idea to fix this problem. thanks.

    image

    opened by alcarazolabs 3
  • Unable to download backup (file size 270mb)

    Unable to download backup (file size 270mb)

    Download works for small file like only db but when I click download button on large file (270mb) it shows following error:

    Error 503. Service Unavailable

    The server is temporarily unavailable. Please check back shortly. If this problem persists, please contact our Technical Support department.

    needs more info 
    opened by DarpanKulkarni 2
  • Bump laravel/framework from 8.40.0 to 8.83.9

    Bump laravel/framework from 8.40.0 to 8.83.9

    Bumps laravel/framework from 8.40.0 to 8.83.9.

    Release notes

    Sourced from laravel/framework's releases.

    v8.83.9

    Fixed

    • Backport Fix PHP warnings when rendering long blade string (#41970)

    v8.83.8

    Added

    • Added multibyte support to string padding helper functions (#41899)

    Fixed

    • Fixed seeder property for in-memory tests (#41869)

    v8.83.7

    Fixed

    • Backport - Fix trashed implicitBinding with child with no softdelete (#41814)
    • Fix assertListening check with auto discovery (#41820)

    v8.83.6

    Fixed

    • Stop throwing LazyLoadingViolationException for recently created model instances (#41549)
    • Close doctrineConnection on disconnect (#41584)
    • Fix require fails if is_file cached by opcache (#41614)
    • Fix collection nth where step <= offset (#41645)

    v8.83.5

    Fixed

    • Backport dynamically access batch options (#41361)
    • Fixed get and head options in Illuminate/Http/Client/PendingRequest.php (23ff879)

    v8.83.4

    v8.83.4 (2022-03-08)

    Added

    • Added Illuminate/Bus/Batch::__get() (#41361)

    Fixed

    • Fixed get and head options in Illuminate/Http/Client/PendingRequest (23ff879)

    v8.83.3

    Fixed

    v8.83.2

    Added

    • Added support of Bitwise opperators in query (#41112)

    Fixed

    • Fixes attempt to log deprecations on mocks (#41057)

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies php 
    opened by dependabot[bot] 2
  • Can't download large backup file

    Can't download large backup file

    I can't download large file above 1GB .But < 1 GB is completely ok. let me know how should I do.

    Browser Error Message is -> This site can’t be reachedThe webpage at http://192.168.3.3/backup/api/download-backup?disk=local&path=something/2020-07-01-10-46-53.zip might be temporarily down or it may have moved permanently to a new web address.

    needs more info 
    opened by nladev 2
  • array_merge(): Expected parameter 1 to be an array, null given

    array_merge(): Expected parameter 1 to be an array, null given

    As of now I just installed and configured this package after following the steps in the main repo page. I am suddenly stuck with this error: array_merge(): Expected parameter 1 to be an array, null given.

    Here is my package.json image

    Here is my config/laravel_backup_panel.php image

    Also here is the error : image

    needs more info 
    opened by briancalma 2
  • Trait 'Illuminate\Console\DetectsApplicationNamespace' not found

    Trait 'Illuminate\Console\DetectsApplicationNamespace' not found

    please upgrade for laravel 7 :)

    https://github.com/laravel/framework/commit/8725e9665f143aeb18a07aa170398f829cfa6688#diff-c17f57d8e225ed7ad5c603b4944c94dc

    opened by ahmadeyamin 2
Releases(2.2.0)
Owner
Pavel Mironchik
Pavel Mironchik
Simple Arabic Laravel Dashboard , has basic settings and a nice layout . to make it easy for you to create fast dashboard

Simple Arabic Laravel Dashboard ✅ Auto Seo ✅ Optimized Notifications With Images ✅ Smart Alerts ✅ Auto Js Validations ✅ Front End Alert ✅ Nice Image V

Peter Tharwat 254 Dec 19, 2022
With dadjokes every time you load your control panel you'll be greeted by an epic dad joke on the dashboard.

Filament Dad Jokes Widget With DadJokes every time you load your control panel you'll be greeted by an epic dad joke on the dashboard. Installation Yo

Craig Smith 15 Jan 7, 2023
Implementation Package Spatie/Laravel-Permission

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

M Rizal 3 Sep 12, 2021
A package to backup your Laravel app

A modern backup solution for Laravel apps This Laravel package creates a backup of your application.

Spatie 5.1k Dec 30, 2022
Laravel Nova filter for Spatie/laravel-tags

SpatieTagsNovaFilter This package allows you to filter resources by tags. (using the awesome Spatie/laravel-tags and Vue-MultiSelect ) Installation Fi

Mahi-Mahi 3 Aug 4, 2022
A Laravel wrapper for spatie/dns. Allows to query and validate DNS records.

A Laravel wrapper for spatie/dns. Allows to query and validate DNS records.

Astrotomic 22 Nov 17, 2022
Forked from spatie-laravel-tags

Add tags and taggable behaviour to a Laravel app This package offers taggable behaviour for your models. After the package is installed the only thing

null 1 Nov 15, 2021
A quiz application with laravel 8, spatie permissions, livewire, jetstream, chartjs, tailwindcss and more!

Todo Currently busy with some other important things, will definately would like to imporove the app with 1. Multiple choices selection and mapping to

Baig 67 Nov 21, 2022
Filament-spatie-laravel-activitylog - View your activity logs inside of Filament. ⚡️

View your activity logs inside of Filament. This package provides a Filament resource that shows you all of the activity logs created using the spatie

Ryan Chandler 45 Dec 26, 2022
.env vars check for Spatie's Laravel Health

Custom check for Spatie's Laravel Health - Ensure every .env variable you need has a value

Encodia 4 Nov 7, 2022
Proyecto Start-Basic sobre Login y crud de usuarios, mediante Api Rest, usando la plantilla AdminLte 3.1 y manejo de roles y permisos con spatie y autenticacion JWT

Proyecto Start-Basic sobre Login y crud de usuarios, mediante Api Rest, usando la plantilla AdminLte 3.1 y manejo de roles y permisos con spatie y autenticacion JWT

null 9 Jul 5, 2022
Laravel Seo package for Content writer/admin/web master who do not know programming but want to edit/update SEO tags from dashboard

Laravel Seo Tools Laravel is becoming more and more popular and lots of web application are developing. In most of the web application there need some

Tuhin Bepari 130 Dec 23, 2022
Easily add a full Laravel blog (with built in admin panel and public views) to your laravel project with this simple package.

Webdevetc BlogEtc - Complete Laravel Blog Package Quickly add a blog with admin panel to your existing Laravel project. It has everything included (ro

WebDevEtc. 227 Dec 25, 2022
A mostly useless package to display framework versions at the bottom of the Admin navigation panel.

A mostly useless package to display framework versions at the bottom of the Filament Admin navigation panel and an optional widget to do the same in the dashboard or custom pages.

Adam Weston 10 Nov 8, 2022
Dashboard to view your http client requests in laravel application

Laravel Blanket is a package with wraps laravel http client requests and provide logs for request and response, also give option to retry any request from dashboard and more...

Ahmed waleed 215 Dec 29, 2022
Fully customizable and tests supported Laravel admin dashboard for developers.

Laravel Admin dashboard Like Laravel Jetstream but built with Hotwire Turbo + additional perks. Tools used: tailwindcomponents/dashboard Hotwire Turbo

null 12 Nov 1, 2022
1Pilot.io, a universal dashboard to effortlessly manage all your Laravel applications

Website · Free Trial · Pricing · Documentation · API · Feedback · Support [You] What are you, strange being? [1Pilot] Greetings, traveller. I am 1Pilo

1Pilot 10 Nov 21, 2022
Free and open-source Laravel admin dashboard interface built with Livewire & Alpine.js based on Bootstrap 5

Volt Dashboard Laravel Free Frontend Web App for Laravel with Livewire & Alpine.js Never start a development project from scratch again. We've partner

Themesberg 200 Jan 4, 2023
Files Course Dashboard EAD with Laravel 9.x

Files Course Dashboard EAD with Laravel 9.x

EspecializaTi 24 Jan 2, 2023