diff --git a/bin/restic_backup.sh b/bin/restic_backup.sh index 651991e..520bce0 100644 --- a/bin/restic_backup.sh +++ b/bin/restic_backup.sh @@ -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.