Use "backupInterval" to disable auto backups (#608)

Gets rid of unnecessary setting
This commit is contained in:
schroda
2023-07-22 17:41:21 +02:00
committed by GitHub
parent d4f9b0b1bc
commit 2a83f290a5
4 changed files with 3 additions and 5 deletions

View File

@@ -56,7 +56,8 @@ object ProtoBackupExport : ProtoBackupBase() {
fun scheduleAutomatedBackupTask() {
HAScheduler.deschedule(backupSchedulerJobId)
if (!serverConfig.automatedBackups) {
val areAutomatedBackupsDisabled = serverConfig.backupInterval == 0
if (areAutomatedBackupsDisabled) {
return
}

View File

@@ -57,7 +57,6 @@ class ServerConfig(getConfig: () -> Config, moduleName: String = MODULE_NAME) :
var backupPath: String by overridableConfig
var backupTime: String by overridableConfig
var backupInterval: Int by overridableConfig
var automatedBackups: Boolean by overridableConfig
var backupTTL: Int by overridableConfig
companion object {

View File

@@ -41,6 +41,5 @@ server.systemTrayEnabled = true
# backup
server.backupPath = ""
server.backupTime = "00:00" # range: hour: 0-23, minute: 0-59 - default: "00:00" - time of day at which the automated backup should be triggered
server.backupInterval = 1 # time in days - range: 1 <= n < ∞ - default: 1 day - interval in which the server will automatically create a backup
server.automatedBackups = true
server.backupInterval = 1 # time in days - 0 to disable it - range: 1 <= n < ∞ - default: 1 day - interval in which the server will automatically create a backup
server.backupTTL = 14 # time in days - 0 to disable it - range: 1 <= n < ∞ - default: 14 days - how long backup files will be kept before they will get deleted

View File

@@ -35,5 +35,4 @@ server.webUIUpdateCheckInterval = 24
server.backupPath = ""
server.backupTime = "00:00"
server.backupInterval = 1
server.automatedBackups = true
server.backupTTL = 14