Dear All,
The below shell script is mounting a drive and taking tar backup with today's date and sending status of log to particular directory & sending mail automatically,when i run the below shell script iam reciving the below error, i tired to solve but i was not able to solve,can any one help to solve the problem.
SHELL SCRIPT:
#!/bin/bash
mount -t cifs //10.200.1.125/servers/$(hostname) temp -o username=harish,password=ecare2@
date=`/bin/date "+%Y.%m.%d.%H.%M.%S"`
tar -cvf temp/$date.tar /backup
echo "Backup taken">>/var/log/$date
mail -s $date
ramkannan_88@yahoo.com <<EOF
Backup completed successfully
ERROR:
[root@itsupport Desktop]# ./daily-backup
mount error: can not change directory into mount target temp
tar: temp/2011.06.30.17.37.05.tar: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
Thanks,