From 6cc047600077562a647fed274ee3c339a19c5985 Mon Sep 17 00:00:00 2001 From: hk Date: Tue, 17 Sep 2019 11:27:47 +0200 Subject: [PATCH] Add encryption parameter to init --- src/borgwrapper | 7 ++++++- src/config.example | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/borgwrapper b/src/borgwrapper index 943cbc8..69be6aa 100755 --- a/src/borgwrapper +++ b/src/borgwrapper @@ -32,7 +32,12 @@ error_handler () { } borg_init () { - ${BORG} init "${BORG_REPO}" + if [[ -z ${BORG_INIT_ARGS[@]} ]]; then + BORG_INIT_ARGS=( + --encryption repokey-blake2 + ) + fi + ${BORG} init "${BORG_INIT_ARGS[@]}" "${BORG_REPO}" } borg_backup () { diff --git a/src/config.example b/src/config.example index 24791d4..7924c37 100644 --- a/src/config.example +++ b/src/config.example @@ -50,3 +50,6 @@ KEEP_YEARLY=5 #BORG_CHECK_ARGS=( # --info #) +#BORG_INIT_ARGS=( +# --encryption repokey-blake2 +#)