add RESTIC_JOB_ARGS env variable to specify extra restic options

This commit is contained in:
Stas
2018-02-03 21:51:17 +01:00
parent 013efd00a9
commit d0cea127a5
3 changed files with 4 additions and 1 deletions

View File

@@ -17,10 +17,11 @@ echo "Starting Backup at $(date)" >> ${lastLogfile}
logLast "BACKUP_CRON: ${BACKUP_CRON}"
logLast "RESTIC_TAG: ${RESTIC_TAG}"
logLast "RESTIC_FORGET_ARGS: ${RESTIC_FORGET_ARGS}"
logLast "RESTIC_JOB_ARGS: ${RESTIC_JOB_ARGS}"
# Do not save full backup log to logfile but to backup-last.log
restic backup /data --tag=${RESTIC_TAG?"Missing environment variable RESTIC_TAG"} >> ${lastLogfile} 2>&1
restic backup /data ${RESTIC_JOB_ARGS} --tag=${RESTIC_TAG?"Missing environment variable RESTIC_TAG"} >> ${lastLogfile} 2>&1
rc=$?
logLast "Finished backup at $(date)"
if [[ $rc == 0 ]]; then