Add additional checks for correct mounting and tagert being writeable
This commit is contained in:
@@ -89,7 +89,7 @@ step_3() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$1" ] ; then
|
if [ -z "$1" ] ; then
|
||||||
echoerr " [E] Noting found to backup $1"
|
echoerr " [E] Nothing found to backup $1"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -137,7 +137,15 @@ step_3() {
|
|||||||
tmpTarget="${buTarget}/"
|
tmpTarget="${buTarget}/"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# remount target to be writable
|
||||||
exep "mount -o rw,remount '${buTarget}' >>/dev/null 2>&1"
|
exep "mount -o rw,remount '${buTarget}' >>/dev/null 2>&1"
|
||||||
|
endReturn -o $? "Remount (${buTarget}) to be writable failed"
|
||||||
|
|
||||||
|
if [ ! -w "${buTarget}" ] ; then
|
||||||
|
echoerr " [E] Backup target (${buTarget}) is not writable"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
exep "mv -f ${buTarget}/${buLog}0.log /tmp/${buLog}1.log 2>/dev/null"
|
exep "mv -f ${buTarget}/${buLog}0.log /tmp/${buLog}1.log 2>/dev/null"
|
||||||
exep "rsync -avxHAX --delete --info=stats2 ${buExcludes[*]} ${tmpSource} ${tmpTarget} > /tmp/${buLog}0.log"
|
exep "rsync -avxHAX --delete --info=stats2 ${buExcludes[*]} ${tmpSource} ${tmpTarget} > /tmp/${buLog}0.log"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user