diff --git a/seqs/backup.sh b/seqs/backup.sh index f331e6e..149d968 100755 --- a/seqs/backup.sh +++ b/seqs/backup.sh @@ -89,7 +89,7 @@ step_3() { fi if [ -z "$1" ] ; then - echoerr " [E] Noting found to backup $1" + echoerr " [E] Nothing found to backup $1" exit 1 fi @@ -137,7 +137,15 @@ step_3() { tmpTarget="${buTarget}/" fi + # remount target to be writable 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 "rsync -avxHAX --delete --info=stats2 ${buExcludes[*]} ${tmpSource} ${tmpTarget} > /tmp/${buLog}0.log"