Skip to content

wertmenschen/backup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Wertmenschen Backup

Require this package with composer

composer require wertmenschen/backup

Create a webdav filesystem

// config/filesystems.php

'disks' => [
    'webdav' => [
        'driver'   => 'webdav',
        'baseUri'  => env('BACKUP_URL'),
        'userName' => env('BACKUP_USERNAME'),
        'password' => env('BACKUP_PASSWORD'),
    ],
];

Optional: Publish the backup config file (overrides Spatie config)

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

Set keys in .env

  • BACKUP_URL
  • BACKUP_USERNAME
  • BACKUP_PASSWORD
  • BACKUP_SLACK_WEBHOOK

Schedule backups

Spatie documentation: https://docs.spatie.be/laravel-backup/v4

// app/Console/Kernel.php

protected function schedule(Schedule $schedule)
{
   $schedule->command('backup:clean')->daily()->at('01:00');
   $schedule->command('backup:run')->daily()->at('02:00');
   $schedule->command('backup:run --only-db')->hourly();
   
   $schedule->command('backup:clean')->dailyAt(4);
   $schedule->command('backup:monitor')->dailyAt(5);
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages