mirror of
https://github.com/lobaro/restic-backup-docker.git
synced 2026-02-22 03:36:22 +00:00
11 lines
312 B
Bash
11 lines
312 B
Bash
#!/bin/sh
|
|
|
|
echo "Starting Backup"
|
|
|
|
restic backup /data --tag=${RESTIC_TAG?"Missing environment variable RESTIC_TAG"} >> /var/log/cron.log
|
|
|
|
if [ -n "${RESTIC_FORGET_ARGS}" ]; then
|
|
echo "Forget about old snapshots based on RESTIC_FORGET_ARGS = ${RESTIC_FORGET_ARGS}"
|
|
restic forget ${RESTIC_FORGET_ARGS}
|
|
fi
|