From ab7fa27b2dc27178d32fb871174af3736252e4b2 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sun, 5 Oct 2014 11:32:23 +0200 Subject: [PATCH] Do not try to get .incremental.snar if we did a date-based backup. --- backup.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 -- 2.39.2