From 88cea11b4463f50d96cb5ef6f7be73fe462080b0 Mon Sep 17 00:00:00 2001 From: Maximilian Weber Date: Tue, 16 Jan 2018 15:45:52 +0100 Subject: [PATCH] change monitoring for newer version of restic --- bin/backup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/backup b/bin/backup index 94787a0..1d9cc54 100755 --- a/bin/backup +++ b/bin/backup @@ -86,7 +86,7 @@ do_monitor () { CRIT=$5 # Get last line and parse into variables. Removes header and is empty when no snapshot exists for host - LAST=`$RESTIC snapshots --compact --no-lock -H $3 | sed 1,2d | tail -n 1` + LAST=`$RESTIC snapshots --compact --no-lock -H $3 | sed 1,2d | head -n -2 | tail -n 1` if [ ! $? -eq 0 ]; then echo "WARNING - restic command returned an error" exit 1;