backup system scripts
backup system via restic backup dav script, remove unneseccary lines
This commit is contained in:
1 parent
845446e1fe
commit
5ec0108117
3 files changed
+64
-43
No files matched your search
Executable
+29
@@ -0,0 +1,29 @@
|
||||
#!/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"
|
||||
Reference in new issue
Block a user