From 96bddad3923d43d5ccd5375922e7479be64e3ab3 Mon Sep 17 00:00:00 2001 From: Hendrik Schutter Date: Sat, 25 Apr 2020 11:10:16 +0200 Subject: [PATCH] added overview and install instructions --- README.md | 50 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8720e7e..afb9f24 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,51 @@ # Restic-Backend-Watchdog -Watchdog for restic backup \ No newline at end of file +Watchdog for restic backup that are automatic triggered via an interval + +**TLDR:** Bash script that emails you if your restic backup interval is overdue. + +## How does it work? +The script monitors the backend of a restic backup. The bash script is executed via cronjob or a systemd-timer periodically. The user sets an interval for eachrestic repo (e.g. your laptop-backup). This is the same interval as the one that triggers the automatic backup from your device. If your automatic backup failed (e.g. no Internet), there will be no changes in den repo. The script will notice that and emails you. + +## Features +* runs just with bash +* no restic authentication needed +* multiple repos +* individual interval for each repo +* custom email server via [ssmtp](https://wiki.debian.org/sSMTP) + +## Planned Features +* Able to determine a failed restic repo task from a successful task + +## Installation +1. download the check_AutoBackup.sh +2. chmod +x check_AutoBackup.sh +3. install ssmtp +4. nano /etc/ssmtp/ssmtp.conf +```UseSTARTTLS=YES +FromLineOverride=YES +root= +mailhub=mail.yourmailserver.tld:587 +AuthUser=mailuser@maildomain.tld +AuthPass=yourmailuserpassword +``` +5. nano /etc/ssmtp/revaliases +```root:mailuser@maildomain.tld:mail.yourmailserver.tld:587 +``` +6. edit settings in check_AutoBackup.sh +DEBUG="true" +timestampFolder="index" #folder for reading timestamp +backupFolder="./backups" #directory that contains all repos +... +receiverEmail="mailuser@maildomain.tld" +senderEmail="mailuser@maildomain.tld" +senderName="AutoBackup Watchdog" +``` +7. edit repo settings in check_AutoBackup.sh +``` +repos_name[0]=" first backup repo" +repos_directory[0]="first_repo" +repos_interval[0]=21600 #sec +repos_interval_tolerance[0]=10 #% +``` +8. install crontab or systemd-timer \ No newline at end of file