introduce new config option BACKUP_ARGS to add additional parameters to backup job (like tagging the backup)
new option is set to empty if not specified otherwise. as suggested in https://github.com/binarybucks/restic-tools/pull/14#issuecomment-359700589 Signed-off-by: Felix Bartels <felix@host-consultants.de>
This commit is contained in:
parent
448b04a3da
commit
696f416aa2
2 changed files with 5 additions and 1 deletions
|
@ -54,11 +54,14 @@ do_local_backup () {
|
|||
|
||||
. /etc/backup/local.config
|
||||
|
||||
# define an empty default if BACKUP_ARGS is not set
|
||||
BACKUP_ARGS=${BACKUP_ARGS:-""}
|
||||
|
||||
if [[ -x /etc/backup/local.pre ]]; then
|
||||
/etc/backup/local.pre $TARGET
|
||||
fi
|
||||
|
||||
$RESTIC --exclude-file /etc/backup/local.exclude backup --hostname $BACKUP_HOSTNAME $BACKUP_DIR
|
||||
$RESTIC --exclude-file /etc/backup/local.exclude backup --hostname $BACKUP_HOSTNAME $BACKUP_ARGS $BACKUP_DIR
|
||||
|
||||
if [[ -x /etc/backup/local.post ]]; then
|
||||
/etc/backup/local.post $TARGET
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
BACKUP_HOSTNAME="backuphost.example.org"
|
||||
BACKUP_DIR="/"
|
||||
BACKUP_ARGS="--tag filesystem"
|
||||
# HEALTHCHECK_URL="<URL from https://healthchecks.io/checks/ to notify>"
|
||||
|
|
Loading…
Reference in a new issue