Skip to content

Commit

Permalink
Merge pull request snipe#16031 from snipe/make_backups_more_configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
snipe authored Jan 7, 2025
2 parents f698f74 + 774e795 commit 407d69b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
6 changes: 6 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ MAIL_BACKUP_NOTIFICATION_ADDRESS=null
BACKUP_ENV=true
ALLOW_BACKUP_DELETE=false
ALLOW_DATA_PURGE=false
ALL_BACKUP_KEEP_DAYS=7
DAILY_BACKUP_KEEP_DAYS=16
WEEKLY_BACKUP_KEEP_WEEKS=8
MONTHLY_BACKUP_KEEP_MONTHS=4
YEARLY_BACKUP_KEEP_YEARS=2
BACKUP_PURGE_OLDEST_AT_MEGS=5000

# --------------------------------------------
# OPTIONAL: SESSION SETTINGS
Expand Down
12 changes: 6 additions & 6 deletions config/backup.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,33 +207,33 @@
/*
* The number of days for which backups must be kept.
*/
'keep_all_backups_for_days' => 7,
'keep_all_backups_for_days' => env('ALL_BACKUP_KEEP_DAYS', 7),

/*
* The number of days for which daily backups must be kept.
*/
'keep_daily_backups_for_days' => 16,
'keep_daily_backups_for_days' => env('DAILY_BACKUP_KEEP_DAYS', 16),

/*
* The number of weeks for which one weekly backup must be kept.
*/
'keep_weekly_backups_for_weeks' => 8,
'keep_weekly_backups_for_weeks' => env('WEEKLY_BACKUP_KEEP_WEEKS', 8),

/*
* The number of months for which one monthly backup must be kept.
*/
'keep_monthly_backups_for_months' => 4,
'keep_monthly_backups_for_months' => env('MONTHLY_BACKUP_KEEP_MONTHS', 4),

/*
* The number of years for which one yearly backup must be kept.
*/
'keep_yearly_backups_for_years' => 2,
'keep_yearly_backups_for_years' => env('YEARLY_BACKUP_KEEP_YEARS', 2),

/*
* 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' => 5000,
'delete_oldest_backups_when_using_more_megabytes_than' => env('BACKUP_PURGE_OLDEST_AT_MEGS', 5000),
],
],

Expand Down

0 comments on commit 407d69b

Please sign in to comment.