X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=backup.sh;h=f054e1aae68fa9d93e875e3db4cb04a9077a9914;hb=966d195df94a5d99952b18e32eb4fc23f52b3a70;hp=2a6d66693033a6505e228122917343448e1ee9b8;hpb=193cb1034eb79f624d39b02bb02ee696ede2ac1b;p=backup.sh diff --git a/backup.sh b/backup.sh index 2a6d666..f054e1a 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 @@ -213,7 +215,7 @@ for filesystem in $filesystems; do # Default backuplevel backuplevel=daglig - if [ ! -f $storagedir/$computer/$sfilesystem/.date ] + if [ ! -s $storagedir/$computer/$sfilesystem/.date ] then # Take the first full backup of this filesystem on this computer backuplevel=full