laravel-backup changes

This commit is contained in:
Nabeel Shahzad
2021-03-05 06:00:36 -05:00
parent c736a9b639
commit b13c4df338
2 changed files with 8 additions and 5 deletions

View File

@@ -31,8 +31,10 @@ class Kernel extends ConsoleKernel
$schedule->command(Hourly::class)->hourly();
// When spatie-backups runs
$schedule->command('backup:clean')->daily()->at('01:00');
$schedule->command('backup:run')->daily()->at('02:00');
if (config('backup.backup.enabled', false) === true) {
$schedule->command('backup:clean')->daily()->at('01:00');
$schedule->command('backup:run')->daily()->at('02:00');
}
// Update the last time the cron was run
/** @var CronService $cronSvc */

View File

@@ -13,8 +13,9 @@ use Spatie\Backup\Tasks\Monitor\HealthChecks\MaximumStorageInMegabytes;
return [
'backup' => [
'name' => config('app.name', 'phpvms-backup'),
'source' => [
'name' => config('app.name', 'phpvms-backup'),
'enabled' => false,
'source' => [
'files' => [
'include' => [
base_path(),
@@ -72,7 +73,7 @@ return [
*
* If you do not want any compressor at all, set it to null.
*/
'database_dump_compressor' => null,
'database_dump_compressor' => Spatie\DbDumper\Compressors\GzipCompressor::class,
'destination' => [