X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=backup.sh;h=bafb1e32997151728cd0289d0c86b452fa37b7d2;hb=dc2f6bebb7369194f903d5cf70ba212c470c79bd;hp=ce6c6d4cac516305b35b52b14c9cc613b5d713ef;hpb=64da3228b66d5687c89f26328ed354ccdcd02aea;p=backup.sh diff --git a/backup.sh b/backup.sh index ce6c6d4..bafb1e3 100755 --- a/backup.sh +++ b/backup.sh @@ -70,15 +70,6 @@ fi; touch $LOCKFILE echo $$ > $LOCKFILE -#syntax of remotestat: -#hostname:/directory/ -remotestatf=$confdir/remotestat -[ -f $remotestatf ] && remotestat=`cat $remotestatf` -### - -PATH=/local/bin:$PATH:/store/bin -export PATH - echo `date`": Backup run starting" >&2 umask 027 @@ -152,6 +143,10 @@ backup() # Check that the target filesystem is mounted (actually check that it's not # the root filesystem) + if [ ! -d "$storagedir/$computer" ]; then + echo `date`" $computer: Target filesystem ($storagedir/$computer) does not exist. Aborting" + die + fi rootfilesystem=`df -P /` targetfilesystem=`df -P "$storagedir/$computer"` if [ "$rootfilesystem" == "$targetfilesystem" ]; then