]> git.sesse.net Git - backup.sh/commitdiff
Check for non-zero tar file instead of errors from tar.
authorroot <empty>
Wed, 15 Aug 2007 14:36:46 +0000 (14:36 +0000)
committerroot <empty>
Wed, 15 Aug 2007 14:36:46 +0000 (14:36 +0000)
backup.sh

index 2838aae5d9bd73a0faf14c74af983fe022e1079c..cf2e24b31205389185aaf20edc6d11a15d29abd0 100755 (executable)
--- a/backup.sh
+++ b/backup.sh
@@ -112,8 +112,8 @@ backup()
  TARCMD="ssh root@$computer \"$tar --one-file-system -zcf - -C $filesystem . $lastcmd \
        --exclude-from=$exf\" > $TARFILE"
  echo `date`" $computer: Running $TARCMD" >&2
-
- if eval $TARCMD; then
+ eval $TARCMD;
+ if [ -s $TARFILE ]; then
   mv $TARFILE $DATE.tgz
   #make a filelist.
   #update the datefile if the filelist is ok.