Skip to content

Commit 407d69b

Browse files
authored
Merge pull request grokability#16031 from snipe/make_backups_more_configurable
2 parents f698f74 + 774e795 commit 407d69b

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

.env.example

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,12 @@ MAIL_BACKUP_NOTIFICATION_ADDRESS=null
8080
BACKUP_ENV=true
8181
ALLOW_BACKUP_DELETE=false
8282
ALLOW_DATA_PURGE=false
83+
ALL_BACKUP_KEEP_DAYS=7
84+
DAILY_BACKUP_KEEP_DAYS=16
85+
WEEKLY_BACKUP_KEEP_WEEKS=8
86+
MONTHLY_BACKUP_KEEP_MONTHS=4
87+
YEARLY_BACKUP_KEEP_YEARS=2
88+
BACKUP_PURGE_OLDEST_AT_MEGS=5000
8389

8490
# --------------------------------------------
8591
# OPTIONAL: SESSION SETTINGS

config/backup.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -207,33 +207,33 @@
207207
/*
208208
* The number of days for which backups must be kept.
209209
*/
210-
'keep_all_backups_for_days' => 7,
210+
'keep_all_backups_for_days' => env('ALL_BACKUP_KEEP_DAYS', 7),
211211

212212
/*
213213
* The number of days for which daily backups must be kept.
214214
*/
215-
'keep_daily_backups_for_days' => 16,
215+
'keep_daily_backups_for_days' => env('DAILY_BACKUP_KEEP_DAYS', 16),
216216

217217
/*
218218
* The number of weeks for which one weekly backup must be kept.
219219
*/
220-
'keep_weekly_backups_for_weeks' => 8,
220+
'keep_weekly_backups_for_weeks' => env('WEEKLY_BACKUP_KEEP_WEEKS', 8),
221221

222222
/*
223223
* The number of months for which one monthly backup must be kept.
224224
*/
225-
'keep_monthly_backups_for_months' => 4,
225+
'keep_monthly_backups_for_months' => env('MONTHLY_BACKUP_KEEP_MONTHS', 4),
226226

227227
/*
228228
* The number of years for which one yearly backup must be kept.
229229
*/
230-
'keep_yearly_backups_for_years' => 2,
230+
'keep_yearly_backups_for_years' => env('YEARLY_BACKUP_KEEP_YEARS', 2),
231231

232232
/*
233233
* After cleaning up the backups remove the oldest backup until
234234
* this amount of megabytes has been reached.
235235
*/
236-
'delete_oldest_backups_when_using_more_megabytes_than' => 5000,
236+
'delete_oldest_backups_when_using_more_megabytes_than' => env('BACKUP_PURGE_OLDEST_AT_MEGS', 5000),
237237
],
238238
],
239239

0 commit comments

Comments
 (0)