Laravel Backup mysql

Faire un Backup fichier de la base mysql dans l’application laravel.


composer require spatie/laravel-backup


php artisan vendor:publish --provider="Spatie\Backup\BackupServiceProvider"

Attention! Deux choses à changer:

                 * The list of directories and files that will be included in the backup.
                'include' => [
                    base_path(),  => //base_path(),
        'mail' => [
            'to' => '',

            'from' => [
                'address' => env('MAIL_FROM_ADDRESS', ''),
                'name' => env('MAIL_FROM_NAME', 'Example'),

Ajouter les bonnes coordonnées !!

Pour le sheduling:

// app/Console/Kernel.php

protected function schedule(Schedule $schedule)


backup:clean     Remove all backups older than specified number of days in config.
backup:list      Display a list of all backups.
backup:monitor   Monitor the health of all backups.
backup:run       Run the backup.