Skip to content

Commit

Permalink
Revert overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
tersmitten committed Jan 25, 2024
1 parent 18dae57 commit 66b7f0d
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@ None
* `duply_backup_profiles.key.conf.gpg`: Override the used gpg executable, defaults to `gpg` (**optional**)
* `duply_backup_profiles.key.conf.gpg_opts`: GPG options passed from duplicity to gpg process (**optional**)
* `duply_backup_profiles.key.conf.gpg_test`: Disable preliminary tests (**optional**, set to `false` to disable)
* `duply_backup_profiles.key.conf.gpg_import`: Disable automatic gpg key importing altogether
* `duply_backup_profiles.key.conf.gpg_export`: Disable automatic gpg key exporting to profile folder
* `duply_backup_profiles.key.conf.target`: Location of the backup target, [see duplicity manpage](http://duplicity.nongnu.org/duplicity.1.html#sect7)
* `duply_backup_profiles.key.conf.target_user`: Username of the backup target (**optional**)
* `duply_backup_profiles.key.conf.target_pass`: Password of the backup target (**optional**)
* `duply_backup_profiles.key.conf.export`: Environment variables to set (**optional**)
* `duply_backup_profiles.key.conf.export.{n}.name`: Name of the variable (e.g. `AWS_ACCESS_KEY_ID`)
* `duply_backup_profiles.key.conf.export.{n}.value`: Value of the variable (e.g. `26E1A49CFE81D46C83C2`)
* `duply_backup_profiles.key.conf.source`: Base directory to backup
* `duply_backup_profiles.key.conf.source`: Base directory to back up
* `duply_backup_profiles.key.conf.dupl_precmd`: A command that runs duplicity (**optional**)
* `duply_backup_profiles.key.conf.python`: Override the used python interpreter, defaults to `python` (**optional**)
* `duply_backup_profiles.key.conf.exclude_if_present`: Exclude if present file name (**optional**)
Expand All @@ -39,7 +41,7 @@ None
* `duply_backup_profiles.key.conf.volsize`: Sets the size of backup chunks (**optional**, in MB's)
* `duply_backup_profiles.key.conf.verbosity`: Verbosity of output (**optional**)
* `duply_backup_profiles.key.conf.temp_dir`: Temporary file space. At least the size of the biggest file in backup for a successful restoration process (**optional**)
* `duply_backup_profiles.key.conf.arch_dir`: Defines a folder that holds unencrypted meta data of the backup, enabling new incrementals without the need to decrypt backend metadata first (**optional**)
* `duply_backup_profiles.key.conf.arch_dir`: Defines a folder that holds unencrypted metadata of the backup, enabling new incrementals without the need to decrypt backend metadata first (**optional**)
* `duply_backup_profiles.key.conf.time_separator`: Enables duplicity `--time-separator` option (**optional**, **deprecated**, set to `true` to enable)
* `duply_backup_profiles.key.conf.short_filenames`: Enables duplicity `--short-filenames` option (**optional**, **deprecated**, set to `true` to enable)
* `duply_backup_profiles.key.conf.dupl_params`: Additional duplicity command line options. Don't forget to leave a separating space char at the end (**optional**)
Expand Down
46 changes: 46 additions & 0 deletions templates/etc/duply/conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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_<profile>/'
# if set '${ARCH_DIR}/<profile>'
{% 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
Expand All @@ -228,16 +262,28 @@ 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
# system that can't have filenames longer than 30 characters (e.g. Mac OS 8)
# 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 %}

0 comments on commit 66b7f0d

Please sign in to comment.