pre_backup commands (#107)

* pre_backup list

* add $INSTALL_PREFIX

* make it executable

* remove pre_backup.txt

* fix quotes

Co-authored-by: Erik Westrup <erik.westrup@gmail.com>

---------

Co-authored-by: Erik Westrup <erik.westrup@gmail.com>
This commit is contained in:
Ante de Baas
2023-03-08 10:53:20 +01:00
committed by GitHub
parent f5c50a18ad
commit 347322d9c9

View File

@@ -44,6 +44,9 @@ assert_envvars \
IFS=':' read -ra backup_paths <<< "$RESTIC_BACKUP_PATHS"
IFS=' ' read -ra extra_args <<< "$RESTIC_BACKUP_EXTRA_ARGS"
#run the commands listed here before running the actual backup.
PRE_SCRIPT="${INSTALL_PREFIX}/etc/restic/pre_backup.sh"
test -x "$PRE_SCRIPT" && "$PRE_SCRIPT"
# Set up exclude files: global + path-specific ones
# NOTE that restic will fail the backup if not all listed --exclude-files exist. Thus we should only list them if they are really all available.