From 80b6956d5393876a935dafcd3bbcac655f63d0d3 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 15 Aug 2007 14:36:46 +0000 Subject: [PATCH] Check for non-zero tar file instead of errors from tar. --- backup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backup.sh b/backup.sh index 2838aae..cf2e24b 100755 --- 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. -- 2.39.2