]> git.sesse.net Git - backup.sh/commitdiff
Do not try to get .incremental.snar if we did a date-based backup.
authorSteinar H. Gunderson <sesse@samfundet.no>
Sun, 5 Oct 2014 09:32:23 +0000 (11:32 +0200)
committerSteinar H. Gunderson <sesse@samfundet.no>
Sun, 5 Oct 2014 09:32:23 +0000 (11:32 +0200)
backup.sh

index 2a6d66693033a6505e228122917343448e1ee9b8..48307bc92ad3b81c994b3aa3b6d3920019b216be 100755 (executable)
--- 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