-
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
-
you need to add '/bin/sh' at the begning of the script
Thanks
Kishore Kumar
-
When you log in as root, the '.' is not in you PATH. ( security )
So you have to tell the shell where the script is.
Try
./oravis_backup.sh > oravis_backup_31May01.log 2>&1
or ( and maybe better )
full_path/oravis_backup.sh > full_path/oravis_backup_31May01.log 2>&1
-
....thanks a lot you guys! Problem solved....
audere
-
Hi
Can u explain the following line in u'r script?
/usr/sbin/ufsdump 0f /dev/rmt/0cn /dbs/oradb2/visdata
I normarlly use
tar -cvf /dev/rmt/0 /dbs/oradb2/visdata
tar -rvf /dev/rmt/0 /dbs/oradb3/visdata
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|