Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions config/backup.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use Spatie\Backup\Tasks\Cleanup\Strategies\DefaultStrategy;
use Spatie\Backup\Tasks\Monitor\HealthChecks\MaximumAgeInDays;
use Spatie\Backup\Tasks\Monitor\HealthChecks\MaximumStorageInMegabytes;
use Spatie\DbDumper\Compressors\GzipCompressor;

return [

Expand All @@ -29,7 +30,8 @@
* The list of directories and files that will be included in the backup.
*/
'include' => [
base_path(),
// Keep backups database-focused to respect our limited Ceph quota.
// Production backups are normally generated with --only-db.
],

/*
Expand Down Expand Up @@ -106,7 +108,7 @@
*
* If you do not want any compressor at all, set it to null.
*/
'database_dump_compressor' => null,
'database_dump_compressor' => GzipCompressor::class,

/*
* The file extension used for the database dump files.
Expand Down Expand Up @@ -222,7 +224,7 @@
'monitor_backups' => [
[
'name' => env('APP_NAME', 'laravel-backup'),
'disks' => ['local'],
'disks' => ['ceph'],
Comment on lines 226 to +227
'health_checks' => [
MaximumAgeInDays::class => 1,
MaximumStorageInMegabytes::class => 5000,
Expand Down Expand Up @@ -266,14 +268,14 @@
'keep_daily_backups_for_days' => 7,

/*
* The number of weeks for which one weekly backup must be kept.
* Keep a few weekly snapshots without growing Ceph usage indefinitely.
*/
'keep_weekly_backups_for_weeks' => 0,
'keep_weekly_backups_for_weeks' => 4,

/*
* The number of months for which one monthly backup must be kept.
* Keep a small number of monthly snapshots for longer-term recovery.
*/
'keep_monthly_backups_for_months' => 0,
'keep_monthly_backups_for_months' => 2,

/*
* The number of years for which one yearly backup must be kept.
Expand All @@ -284,7 +286,7 @@
* After cleaning up the backups remove the oldest backup until
* this amount of megabytes has been reached.
*/
'delete_oldest_backups_when_using_more_megabytes_than' => null,
'delete_oldest_backups_when_using_more_megabytes_than' => (int) env('BACKUP_MAX_STORAGE_MB', 4096),
],
],

Expand Down
Loading