Tambahkan beberapa kode untuk memeriksa mounts dan untuk mencoba dan remount mereka jika diperlukan - inilah beberapa (potongan bit) dari skrip bash cadangan Linux (maaf, tidak ada OSX untuk diserahkan saat ini) - mungkin memberi Anda beberapa petunjuk dan mungkin seseorang akan memposting setara OSX juga:
thishost='myhostname'
#
mountpoint='/root/mybackup'
#
mountoptions='-o username=bkuplinux,domain=mydomain,password=mypassword'
#
sharename='//ssc4/linux'
#
emailtarget='myemail@address.com'
###################################
# End of user editable variables
###################################
backupfolder=$mountpoint/$thishost
if [ $(mount | grep -c $mountpoint) != 1 ]; then
echo "$mountpoint mount is not present - trying to mount..."
mount -t cifs $sharename $mountpoint $mountoptions
if [ $(mount | grep -c $mountpoint) != 1 ]; then
echo "$mountpoint mount is still not present - quitting"
if [ "$emailtarget" != "" ]; then
echo "$mountpoint mount is not present on $thishost so backup cannot continue" | mail -s "$thishost backup problem" $emailtarget
fi
exit 1
fi
fi