From: Steinar H. Gunderson Date: Sun, 5 Oct 2014 09:32:23 +0000 (+0200) Subject: Do not try to get .incremental.snar if we did a date-based backup. X-Git-Url: https://git.sesse.net/?p=backup.sh;a=commitdiff_plain;h=ab7fa27b2dc27178d32fb871174af3736252e4b2 Do not try to get .incremental.snar if we did a date-based backup. --- diff --git a/backup.sh b/backup.sh index 2a6d666..48307bc 100755 --- a/backup.sh +++ b/backup.sh @@ -114,9 +114,11 @@ backup() if [ $? -eq 0 ] && [ -s $TARFILE ]; then # File is >0 in size and neither cat or tar tzvf failed; we assume it worked. - - if ! scp root@$computer:$incrementalsnar $SNARFILE.tmp; then - diemsg "Could not copy .incremental.snar from $computer" + + if [ "$incrementalsnar" ]; then + if ! scp root@$computer:$incrementalsnar $SNARFILE.tmp; then + diemsg "Could not copy .incremental.snar from $computer" + fi fi # Move tar file in place