add timestamp to dead.letter

This commit is contained in:
tengel 2025-05-27 08:49:18 -05:00
parent 431ebe6578
commit 9b6fe1adfa

View file

@ -1,5 +1,5 @@
#!/usr/bin/env bash
# shellcheck disable=SC2317,SC2086,SC2181,SC2129,SC2002
# shellcheck disable=SC2317,SC2086,SC2181,SC2129,SC2002,SC2088
#
# restic backup using rclone as the transport
# - designed to be cron/timer driven, uses repo key on disk (security warning)
@ -45,6 +45,10 @@ TIMESTAMP=$(date +%Y-%m-%d_%H%M)
MAILSUB="restic backup: ${TIMESTAMP}"
LOGFILE="${LOGDIR}/restic_${TIMESTAMP}.log"
# have `mail` add timestamps to dead.letter
DEAD="~/dead.letter-${TIMESTAMP}"
export DEAD
# restic settings
REPO="rclone:remote:"
RSRC="/home/user"