From e95a85df42ce8402ecdaa20ead886fff2c409a13 Mon Sep 17 00:00:00 2001 From: Marco Kundt Date: Tue, 19 Jan 2021 17:12:49 +0100 Subject: [PATCH] export path and add curly braces --- restic/.bin/restic_backup | 7 ++++--- restic/.bin/restic_prune | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/restic/.bin/restic_backup b/restic/.bin/restic_backup index c7a7b4c..589409d 100755 --- a/restic/.bin/restic_backup +++ b/restic/.bin/restic_backup @@ -2,10 +2,11 @@ . $HOME/.bin/restic_common export RESTIC_PASSWORD="${RESTIC_PASSWORD}" +export PATH="$HOME/.local/bin:$PATH" info "Starting backup" -restic -r $RESTIC_REPOSITORY unlock -restic --cache-dir $CACHE_DIR -r $RESTIC_REPOSITORY backup $BACKUP_PATHS $BACKUP_EXCLUDES +restic -r ${RESTIC_REPOSITORY} unlock +restic --cache-dir ${CACHE_DIR} -r ${RESTIC_REPOSITORY} backup ${BACKUP_PATHS} --exclude ${BACKUP_EXCLUDES} info "Forgetting snapshots" -restic --cache-dir $CACHE_DIR -r $RESTIC_REPOSITORY forget --keep-hourly $KEEP_HOURS --keep-daily $KEEP_DAYS --keep-weekly $KEEP_WEEKS --keep-monthly $KEEP_WEEKS --keep-yearly $KEEP_YEARS \ No newline at end of file +restic --cache-dir ${CACHE_DIR} -r ${RESTIC_REPOSITORY} forget --keep-hourly ${KEEP_HOURS} --keep-daily ${KEEP_DAYS} --keep-weekly ${KEEP_WEEKS} --keep-monthly ${KEEP_WEEKS} --keep-yearly ${KEEP_YEARS} diff --git a/restic/.bin/restic_prune b/restic/.bin/restic_prune index 8d6a36f..65b9bf0 100755 --- a/restic/.bin/restic_prune +++ b/restic/.bin/restic_prune @@ -2,6 +2,7 @@ . $HOME/.bin/restic_common export RESTIC_PASSWORD="${RESTIC_PASSWORD}" +export PATH="$HOME/.local/bin:$PATH" info "Pruning snapshots" -restic --cache-dir $CACHE_DIR -r $RESTIC_REPOSITORY prune +restic --cache-dir ${CACHE_DIR} -r ${RESTIC_REPOSITORY} prune