mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 12:53:42 +08:00
FEATURE: Setting for compression level of upload in backups
This commit is contained in:
parent
59640ef373
commit
9eb7dea0f1
|
@ -1494,6 +1494,7 @@ en:
|
|||
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_location: "Location where backups are stored. IMPORTANT: S3 requires valid S3 credentials entered in Files settings."
|
||||
backup_gzip_compression_level_for_uploads: "Gzip compression level used for compressing uploads."
|
||||
|
||||
active_user_rate_limit_secs: "How frequently we update the 'last_seen_at' field, in seconds"
|
||||
verbose_localization: "Show extended localization tips in the UI"
|
||||
|
|
|
@ -1529,6 +1529,11 @@ backups:
|
|||
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$"
|
||||
backup_with_uploads: true
|
||||
backup_gzip_compression_level_for_uploads:
|
||||
default: 1
|
||||
min: 1
|
||||
max: 9
|
||||
shadowed_by_global: true
|
||||
|
||||
search:
|
||||
min_search_term_length:
|
||||
|
|
|
@ -248,7 +248,10 @@ module BackupRestore
|
|||
remove_tmp_directory
|
||||
|
||||
log "Gzipping archive, this may take a while..."
|
||||
Discourse::Utils.execute_command('gzip', '-5', tar_filename, failure_message: "Failed to gzip archive.")
|
||||
Discourse::Utils.execute_command(
|
||||
'gzip', "-#{SiteSetting.backup_gzip_compression_level_for_uploads}", tar_filename,
|
||||
failure_message: "Failed to gzip archive."
|
||||
)
|
||||
end
|
||||
|
||||
def upload_archive
|
||||
|
|
Loading…
Reference in New Issue
Block a user