wertmenschen / backup
Backup of Laravel applications to WebDAV (Nextcloud/Owncloud)
Installs: 1 795
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: ~5.6|~7.0|~7.1|~7.2|~7.3
- guzzlehttp/guzzle: ^6.3
- league/flysystem-webdav: 1.0.5
- spatie/laravel-backup: ^6.1
Requires (Dev)
- phpunit/phpunit: ~4.0||~5.0
- squizlabs/php_codesniffer: ^2.3
This package is not auto-updated.
Last update: 2024-11-24 04:52:48 UTC
README
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); }