mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
Merge pull request #4337 from tgxworld/disable_readonly_mode_during_backup
FEATURE: Add SiteSetting to disable readonly mode during backup.
This commit is contained in:
commit
d4a80f9c6e
3 changed files with 4 additions and 1 deletions
|
@ -1008,6 +1008,7 @@ en:
|
|||
github_client_id: "Client id for Github authentication, registered at https://github.com/settings/applications"
|
||||
github_client_secret: "Client secret for Github authentication, registered at https://github.com/settings/applications"
|
||||
|
||||
readonly_mode_during_backup: "Enable read only mode while taking a backup"
|
||||
allow_restore: "Allow restore, which can replace ALL site data! Leave false unless you plan to restore a backup"
|
||||
maximum_backups: "The maximum amount of backups to keep on disk. Older backups are automatically deleted"
|
||||
automatic_backups_enabled: "Run automatic backups as defined in backup frequency"
|
||||
|
|
|
@ -970,6 +970,8 @@ legal:
|
|||
default: ''
|
||||
|
||||
backups:
|
||||
readonly_mode_during_backup:
|
||||
default: true
|
||||
allow_restore:
|
||||
default: false
|
||||
maximum_backups:
|
||||
|
|
|
@ -89,7 +89,7 @@ module BackupRestore
|
|||
@archive_directory = File.join(Rails.root, "public", "backups", @current_db)
|
||||
@archive_basename = File.join(@archive_directory, "#{SiteSetting.title.parameterize}-#{@timestamp}")
|
||||
@logs = []
|
||||
@readonly_mode_was_enabled = Discourse.readonly_mode?
|
||||
@readonly_mode_was_enabled = Discourse.readonly_mode? || !SiteSetting.readonly_mode_during_backup
|
||||
end
|
||||
|
||||
def listen_for_shutdown_signal
|
||||
|
|
Loading…
Reference in a new issue