#!/bin/bash

PATH=/sbin:/bin:/usr/sbin:/usr/bin:$PATH

umount /dev/sdd1 2>/dev/null

/bin/mount /dev/sdd1  /mnt 2>/dev/null
 
if [ $? != 0 ]
then
echo "Backup failed for the application disk. Please check and correct." |  /bin/mailx -s "Backup failed for the application diskon mccas2. Please check and correct." "brobeck@slac.stanford.edu,jingchen@slac.stanford.edu"
exit 0
else
/usr/bin/rsync -avz /opt/oracle/ /mnt  >/tmp/rsynclog
/bin/umount /dev/sdd1 2>/dev/null
fi
