restic-config/backup.sh

10 lines
354 B
Bash
Raw Permalink Normal View History

2024-11-19 17:12:42 +00:00
#!/bin/bash
exec &>>/var/log/restic.log
source /etc/restic/restic_env.sh
cd ${BACKUP_ROOT}
date +"%h %e %T $HOSTNAME restic $$[$BASHPID]: Starting backup"
restic backup --exclude-file /etc/restic/excludes.txt .
date +"%h %e %T $HOSTNAME restic $$[$BASHPID]: Pruning old files"
restic prune
2024-11-19 17:12:42 +00:00
date +"%h %e %T $HOSTNAME restic $$[$BASHPID]: Backup complete"