projects
/
outofuni
/
backup.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
more verbose output in case of errors
[outofuni/backup.git]
/
bin
/
backup
diff --git
a/bin/backup
b/bin/backup
index
191d5be
..
b29d2b7
100755
(executable)
--- a/
bin/backup
+++ b/
bin/backup
@@
-55,6
+55,11
@@
else
log "host $host (via $remote) is online ..."
fi
log "host $host (via $remote) is online ..."
fi
+if [ ! -z "`ssh $user@$remote 'cat ~/.backup | grep ^off'`" ]; then
+ log "backup rejected by client ..."
+ exit 0
+fi
+
comp=6
if [ ! -z "$compression" ]; then
comp=$compression
comp=6
if [ ! -z "$compression" ]; then
comp=$compression
@@
-156,11
+161,13
@@
if [ ! -f $backupdir/.$today ]; then
rsync=(rsync -aR -e "ssh -c $ciph" $rcomp --delete)
rsync+=($rbw $user@$remote$rsrc $cbd)
fi
rsync=(rsync -aR -e "ssh -c $ciph" $rcomp --delete)
rsync+=($rbw $user@$remote$rsrc $cbd)
fi
- "${rsync[@]}"
+ res=`"${rsync[@]}" 2>&1`
ret=$?
if [ "$ret" != "0" ]; then
log backup terminated before completion ...
ret=$?
if [ "$ret" != "0" ]; then
log backup terminated before completion ...
+ log reason:
+ log $res
exit -50
fi
exit -50
fi