Set proper default values for core settings.

If nothing set in the settings file some entries need to be default set:
COMPRESSION
COMPRESSION_LEVEL
ENCRYPTION
FORCE_CHECK
KEEP_LAST
KEEP_HOURS
KEEP_DAYS
KEEP_WEEKS
KEEP_MONTHS
KEEP_YEARS

If these variables are empty after settings file is ready they are set
to the default value. After that the sub configs override those settings
This commit is contained in:
Clemens Schwaighofer
2022-03-08 13:52:47 +09:00
parent ee1b3b23ab
commit 828a59c984
2 changed files with 68 additions and 13 deletions

View File

@@ -35,6 +35,18 @@ eg:
If `FILE_REPOSITORY_COMPATIBLE` is set to `false` in the borg.backup.file.settings then the file borg name will have `-file` added too. Currently this is not added to stay compatible with older scripts
All below have default values if not set in the main settings file
* COMPRESSION: zstd
* COMPRESSION_LEVEL: 3
* ENCRYPTION: none
* FORCE_CHECK: false
* KEEP_LAST: 0
* KEEP_HOURS: 0
* KEEP_DAYS: 7
* KEEP_WEEKS: 4
* KEEP_MONTHS: 6
* KEEP_YEARS: 1
All module settings files can have the following prefixed with `SUB_` to override master settings:
* SUB_BACKUP_FILE
* SUB_COMPRESSION