Borg backups » 76-borgbackupcheck.sh
1 |
#!/bin/sh
|
---|---|
2 | |
3 |
server=iz.mayfirst.org |
4 |
scpuser=palantetech-sync |
5 |
passphrase=PASSPHRASE |
6 |
directory="~/backups/borgbackups/bagel" |
7 |
command="export BORG_PASSPHRASE='$passphrase' && borg check -v $directory && unset BORG_PASSPHRASE" |
8 | |
9 | |
10 |
OUTPUT=$(( |
11 | |
12 |
ssh $scpuser@$server "$command" |
13 | |
14 |
) 2>&1) |
15 |
if [ $? -ne 0 ] |
16 |
then
|
17 |
warning $OUTPUT
|
18 |
fi
|
19 |