30 lines
772 B
Bash
Executable File
30 lines
772 B
Bash
Executable File
#!/bin/bash
|
|
LOGFILE="/var/log/restic-backup.log"
|
|
|
|
export RESTIC_REPOSITORY=/backup/restic
|
|
export RESTIC_PASSWORD_FILE=/root/.config/restic/password
|
|
|
|
sudo -u lucas /home/lucas/scripts/utils/backup_calender_contacts.sh
|
|
{
|
|
echo "========== $(date '+%Y-%m-%d %H:%M:%S') =========="
|
|
|
|
restic backup \
|
|
/docker \
|
|
/data/audiobookshelf \
|
|
/data/gitea \
|
|
/data/navidrome \
|
|
/data/nextcloud/data/lucas/files \
|
|
/data/nextcloud/data/Mimi/files \
|
|
/data/homeassistant \
|
|
/backup/dav \
|
|
--exclude-file /root/.config/restic/excludes.txt
|
|
|
|
restic forget --prune \
|
|
--keep-daily 7 \
|
|
--keep-weekly 4 \
|
|
--keep-monthly 12
|
|
|
|
echo "Backup completed successfully"
|
|
echo
|
|
} | tee -a "$LOGFILE"
|