Hi all,
I'm trying to get a unix backup script to work - oravis_backup.sh, but when I run it (logged in as root) it returns "oravis_backup.sh: not found". I am calling the script as follows:
oravis_backup.sh > oravis_backup_31May01.log 2>&1 and the file itself looks like....
# shut down all applications/listeners etc
su oravis -c "/export/home/oravis/scripts/vis_all_stop.sh"
#
#tape=/dev/rmt/0n
#
# Rewind the tape for a complete backup
mt -f /dev/rmt/0 rewind
#
# Use ufsdump for backup
#
/usr/sbin/ufsdump 0f /dev/rmt/0cn /dbs/oradb2/visdata
/usr/sbin/ufsdump 0f /dev/rmt/0cn /dbs/oradb3/visdata
/usr/sbin/ufsdump 0f /dev/rmt/0cn /dba/app/oracle/admin
/usr/sbin/ufsdump 0f /dev/rmt/0cn /opt/appl/oracle
/usr/sbin/ufsdump 0f /dev/rmt/0cn /export/home/oravis
#
#
# Rewind the tape and put offline
# mt -f /dev/rmt/0 rewoffl
su oravis -c "/export/home/oravis/scripts/vis_all_start.sh"
...both the .sh files mentioned above exist in the same directory and I've changed the permissions using chmod to 777.
Any clues on this one??
Thanks,
audere
05-30-2001, 10:06 PM
Kishore
you need to add '/bin/sh' at the begning of the script
05-31-2001, 03:47 AM
denevge
When you log in as root, the '.' is not in you PATH. ( security )
So you have to tell the shell where the script is.