mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 09:36:19 -05:00
FEATURE: Disable removal of backups from S3
This commit is contained in:
parent
41a0f9b7fd
commit
618eef680e
3 changed files with 4 additions and 1 deletions
|
@ -34,7 +34,7 @@ class Backup
|
||||||
end
|
end
|
||||||
|
|
||||||
def after_remove_hook
|
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
|
end
|
||||||
|
|
||||||
def s3_bucket
|
def s3_bucket
|
||||||
|
|
|
@ -956,6 +956,7 @@ en:
|
||||||
backup_frequency: "How frequently we create a site backup, in days."
|
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."
|
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_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_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."
|
backup_with_uploads: "Include uploads in scheduled backups. Disabling this will only backup the database."
|
||||||
|
|
||||||
|
|
|
@ -885,6 +885,8 @@ backups:
|
||||||
default: ''
|
default: ''
|
||||||
regex: "^[^A-Z_.]+$" # can't use '.' when using HTTPS
|
regex: "^[^A-Z_.]+$" # can't use '.' when using HTTPS
|
||||||
shadowed_by_global: true
|
shadowed_by_global: true
|
||||||
|
s3_disable_cleanup:
|
||||||
|
default: false
|
||||||
backup_time_of_day:
|
backup_time_of_day:
|
||||||
default: '3:30'
|
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$"
|
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 a new issue