Add automated Restic backups for edge01

This commit is contained in:
2026-07-27 22:40:58 -04:00
parent b12e0fd163
commit 7daba4343e
8 changed files with 101 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
#!/bin/bash
set -euo pipefail
source /etc/restic/edge01.env
exec 9>/run/restic-edge01.lock
if ! flock -n 9; then
echo "Another Restic operation is already running."
exit 1
fi
echo "Starting edge01 backup at $(date --iso-8601=seconds)"
restic backup \
/etc \
/home/debian \
/opt \
--exclude /opt/backups \
--exclude '/opt/docker/gitea/data/git/repositories/*/*.git/tmp' \
--tag edge01 \
--tag automatic
echo "Backup completed at $(date --iso-8601=seconds)"