commit
f5410c38e2
3 changed files with 10 additions and 0 deletions
|
@ -6,3 +6,8 @@ Local includes and excludes in `/etc/backup/local.config` or `/etc/backup/local.
|
|||
* `backup $REPO local` for local backup to repo configured by
|
||||
* `backup $REPO monitor $HOST $WARN_HOURS $CRIT_HOURS` for Nagios/Icinga checks of backups
|
||||
* `backup $REPO $ARGUMENTS` for invoking restic with $ARGUMENTS for the repository
|
||||
|
||||
In `local.config`:
|
||||
* `BACKUP_HOSTNAME` is the name your host will show up as in restic
|
||||
* `BACKUP_DIR` is the root of the directory you want to back up
|
||||
* `HEALTHCHECK_URL` is an optional URL to [healthchecks.io](https://healthchecks.io/checks/) (comment out if you don't need it)
|
||||
|
|
|
@ -59,6 +59,10 @@ do_local_backup () {
|
|||
|
||||
. /etc/backup/local.config
|
||||
$RESTIC --exclude-file /etc/backup/local.exclude backup --hostname $BACKUP_HOSTNAME $BACKUP_DIR
|
||||
|
||||
if [ -n "$HEALTHCHECK_URL" ]; then
|
||||
curl -fsS --retry 4 "$HEALTHCHECK_URL" > /dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
do_monitor () {
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
BACKUP_HOSTNAME="backuphost.example.org"
|
||||
BACKUP_DIR="/"
|
||||
# HEALTHCHECK_URL="<URL from https://healthchecks.io/checks/ to notify>"
|
||||
|
|
Loading…
Reference in a new issue