From 5858e0547a9c403bfcac801a784da09fa69dcad2 Mon Sep 17 00:00:00 2001 From: Mischa ter Smitten Date: Thu, 25 Jan 2024 17:18:07 +0100 Subject: [PATCH] Revert overrides --- templates/etc/duply/conf.j2 | 46 +++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/templates/etc/duply/conf.j2 b/templates/etc/duply/conf.j2 index a0281d9..a0a966e 100644 --- a/templates/etc/duply/conf.j2 +++ b/templates/etc/duply/conf.j2 @@ -178,38 +178,68 @@ DUPL_PARAMS="$DUPL_PARAMS --exclude-if-present '$FILENAME'" # Time frame for old backups to keep, Used for the "purge" command. # see duplicity man page, chapter TIME_FORMATS) +{% if item.value.conf.max_age is defined %} +MAX_AGE={{ item.value.conf.max_age }} +{% else %} #MAX_AGE=1M +{% endif %} # Number of full backups to keep. Used for the "purgeFull" command. # See duplicity man page, action "remove-all-but-n-full". +{% if item.value.conf.max_full_backups is defined %} +MAX_FULL_BACKUPS={{ item.value.conf.max_full_backups }} +{% else %} #MAX_FULL_BACKUPS=1 +{% endif %} # Number of full backups for which incrementals will be kept for. # Used for the "purgeIncr" command. # See duplicity man page, action "remove-all-inc-of-but-n-full". +{% if item.value.conf.max_fulls_with_incrs is defined %} +MAX_FULLS_WITH_INCRS={{ item.value.conf.max_fulls_with_incrs }} +{% else %} #MAX_FULLS_WITH_INCRS=1 +{% endif %} # activates duplicity --full-if-older-than option (since duplicity v0.4.4.RC3) # forces a full backup if last full backup reaches a specified age, for the # format of MAX_FULLBKP_AGE see duplicity man page, chapter TIME_FORMATS # Uncomment the following two lines to enable this setting. +{% if item.value.conf.max_fullbkp_age is defined %} +MAX_FULLBKP_AGE={{ item.value.conf.max_fullbkp_age }} +DUPL_PARAMS="$DUPL_PARAMS --full-if-older-than $MAX_FULLBKP_AGE " +{% else %} #MAX_FULLBKP_AGE=1M #DUPL_PARAMS="$DUPL_PARAMS --full-if-older-than $MAX_FULLBKP_AGE " +{% endif %} # sets duplicity --volsize option (available since v0.4.3.RC7) # set the size of backup chunks to VOLSIZE MB instead of the default 25MB. # VOLSIZE must be number of MB's to set the volume size to. # Uncomment the following two lines to enable this setting. +{% if item.value.conf.volsize is defined %} +VOLSIZE={{ item.value.conf.volsize }} +DUPL_PARAMS="$DUPL_PARAMS --volsize $VOLSIZE " +{% else %} #VOLSIZE=50 #DUPL_PARAMS="$DUPL_PARAMS --volsize $VOLSIZE " +{% endif %} # verbosity of output (error 0, warning 1-2, notice 3-4, info 5-8, debug 9) # default is 4, if not set +{% if item.value.conf.verbosity is defined %} +VERBOSITY={{ item.value.conf.verbosity }} +{% else %} #VERBOSITY=5 +{% endif %} # temporary file space. at least the size of the biggest file in backup # for a successful restoration process. (default is '/tmp', if not set) +{% if item.value.conf.temp_dir is defined %} +TEMP_DIR={{ item.value.conf.temp_dir }} +{% else %} #TEMP_DIR=/tmp +{% endif %} # Modifies archive-dir option (since 0.6.0) Defines a folder that holds # unencrypted meta data of the backup, enabling new incrementals without the @@ -219,7 +249,11 @@ DUPL_PARAMS="$DUPL_PARAMS --exclude-if-present '$FILENAME'" # big over time so you might want to put it not in the home dir. # default '~/.cache/duplicity/duply_/' # if set '${ARCH_DIR}/' +{% if item.value.conf.arch_dir is defined %} +ARCH_DIR={{ item.value.conf.arch_dir }} +{% else %} #ARCH_DIR=/some/space/safe/.duply-cache +{% endif %} # DEPRECATED setting # sets duplicity --time-separator option (since v0.4.4.RC2) to allow users @@ -228,7 +262,11 @@ DUPL_PARAMS="$DUPL_PARAMS --exclude-if-present '$FILENAME'" # NOTE: '-' is not valid as it conflicts with date separator. # ATTENTION: only use this with duplicity < 0.5.10, since then default file # naming is compatible and this option is pending depreciation +{% if item.value.conf.time_separator is defined and item.value.conf.time_separator | bool == True %} +DUPL_PARAMS="$DUPL_PARAMS --time-separator _ " +{% else %} #DUPL_PARAMS="$DUPL_PARAMS --time-separator _ " +{% endif %} # DEPRECATED setting # activates duplicity --short-filenames option, when uploading to a file @@ -236,8 +274,16 @@ DUPL_PARAMS="$DUPL_PARAMS --exclude-if-present '$FILENAME'" # or have problems with ':' as part of the filename (e.g. Microsoft Windows) # ATTENTION: only use this with duplicity < 0.5.10, later versions default file # naming is compatible and this option is pending depreciation +{% if item.value.conf.short_filenames is defined and item.value.conf.short_filenames | bool == True %} +DUPL_PARAMS="$DUPL_PARAMS --short-filenames " +{% else %} #DUPL_PARAMS="$DUPL_PARAMS --short-filenames " +{% endif %} # more duplicity command line options can be added in the following way # don't forget to leave a separating space char at the end +{% if item.value.conf.dupl_params is defined %} +DUPL_PARAMS="$DUPL_PARAMS {{ item.value.conf.dupl_params }} " +{% else %} #DUPL_PARAMS="$DUPL_PARAMS --put_your_options_here " +{% endif %}