Can't umount Through Scheduler
Running Debian Squeeze.
I wrote a bash script to do some backups over a small network (with wired and wireless devices). It mounts network shares, performs rsync on that share, and then umounts the network share. The user account logged in is "backupaccount". And when I run the script manually through cli, it runs fine. But I wanted to use Gnome Scheduler to schedule it to run at certain days/times. Everything in the script seems to run fine except it will not umount the network shares. The error is: Code:
umount: /home/backupaccount/BackupData/MntNetworkShares/TestShare1 mount disagrees with the fstab Any help is appreciated! Thanks in advance! Here is my fstab: Code:
# /etc/fstab: static file system information. Code:
/dev/sda2 / ext3 rw,errors=remount-ro 0 0 |
It may not be the umount that is the issue but rather the original mount. You might want to add a line to show what the mount is before you do the umount for debugging purposes e.g.
df -hP /home/backupaccount/BackupData/MntNetworkShares/TestShare1 Verify output of that line shows it is mounted from device, //winxp01/TestShare1. If not then that is your problem and you should focus on the mount you're doing to test its success before you do this. Often things that work fine at command line don't work via automated tools such as cron, init scripts and other schedulers because the user environment you have at command line is built by running profiles but such profiles aren't run by the automated tools. It is necessary therefore to insure the script itself has the correct environmental variables. P.S. rsync is designed to communicate over network for synchronization - have you thought about installing rsync on the host you're trying to copy from (or to) and avoid the mount altogether? |
All times are GMT -5. The time now is 08:22 AM. |