FEATURE: Disable removal of backups from S3
This commit is contained in:
parent
41a0f9b7fd
commit
618eef680e
|
@ -34,7 +34,7 @@ class Backup
|
|||
end
|
||||
|
||||
def after_remove_hook
|
||||
remove_from_s3 if SiteSetting.enable_s3_backups?
|
||||
remove_from_s3 if SiteSetting.enable_s3_backups? && !SiteSetting.s3_disable_cleanup?
|
||||
end
|
||||
|
||||
def s3_bucket
|
||||
|
|
|
@ -956,6 +956,7 @@ en:
|
|||
backup_frequency: "How frequently we create a site backup, in days."
|
||||
enable_s3_backups: "Upload backups to S3 when complete. IMPORTANT: requires valid S3 credentials entered in Files settings."
|
||||
s3_backup_bucket: "The remote bucket to hold backups. WARNING: Make sure it is a private bucket."
|
||||
s3_disable_cleanup: "Disable the removal of backups from S3 when removed locally."
|
||||
backup_time_of_day: "Time of day UTC when the backup should occur."
|
||||
backup_with_uploads: "Include uploads in scheduled backups. Disabling this will only backup the database."
|
||||
|
||||
|
|
|
@ -885,6 +885,8 @@ backups:
|
|||
default: ''
|
||||
regex: "^[^A-Z_.]+$" # can't use '.' when using HTTPS
|
||||
shadowed_by_global: true
|
||||
s3_disable_cleanup:
|
||||
default: false
|
||||
backup_time_of_day:
|
||||
default: '3:30'
|
||||
regex: "^((0?(0|1|2|3|4|5|6|7|8|9)|(10|11|12|13|14|15|16|17|18|19|20|21|22|23))):\\d\\d$"
|
||||
|
|
Loading…
Reference in New Issue