From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,d8c4b6157d9f8b08 X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2003-01-08 04:06:40 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!news-out.cwix.com!newsfeed.cwix.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!feed.news.nacamar.de!news.belwue.de!news.tesion.net!newsfeed-zh.ip-plus.net!news.ip-plus.net!eumel.hag.hilti.com From: "Richard Gliebe" Newsgroups: comp.unix.tru64 Subject: Re: backup skript runs manually but not with cron Date: Wed, 8 Jan 2003 13:06:42 +0100 Organization: Swisscom IP+ (post doesn't reflect views of Swisscom) Message-ID: <3e1c1455$1@eumel.hag.hilti.com> References: <55ab2828.0301080336.3bf2d09d@posting.google.com> NNTP-Posting-Host: h2fw.hilti.com X-Trace: rex.ip-plus.net 1042027585 5361 193.202.255.194 (8 Jan 2003 12:06:25 GMT) X-Complaints-To: abuse@ip-plus.net NNTP-Posting-Date: Wed, 8 Jan 2003 12:06:25 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Original-NNTP-Posting-Host: 10.1.2.12 X-Original-Trace: 8 Jan 2003 13:06:45 +0100, 10.1.2.12 Xref: archiver1.google.com comp.unix.tru64:9350 Hi, can you show me the crontab from root and insert in your script "set -x" Richard "cb" schrieb im Newsbeitrag news:55ab2828.0301080336.3bf2d09d@posting.google.com... > Environment: > DS20 with Tru64 5.1 > Oracle 8.0.x > > Iwrote a backup script which stops oracle and the erp and does a vdump > on a DDS3. > The problem is, that the skript runs fine when I start it manually but > doesn't run when I let it start by cron. As a matter of fact it runs > with cron but is finished about 10 seconds later (normally it takes > 4-5 hours). > No error Message is displayed. > The cron-entry ist in the crontab of root. > The script file has the following rights: > -rwxrwxrwx 1 root system 7091 Jan 6 20:55 backup2 > > Who can help me? > > Thanx in advance > > chris > > Skript directives: > > #!/bin/ksh > > #rewind tape > mt -f /dev/ntape/tape0c rewind >>/usr/local/backup/back.log > #shutdown erp system and check if down > /sbin/init.d/p511_dem511 stop >>/usr/local/backup/back.log > /sbin/init.d/bdepz_stop >>/usr/local/backup/back.log > /sbin/init.d/bde511_pz511p stop >>/usr/local/backup/back.log > /sbin/init.d/p511_pr511 stop >>/usr/local/backup/back.log > ps -ef |grep pz511p >>/usr/local/backup/back.log > ps -ef |grep PPP >>/usr/local/backup/back.log > ps -ef |grep PSI >>/usr/local/backup/back.log > #shutdown oracle > su - ora805 -c "lsnrctl stop" >>/usr/local/backup/back.log > su - ora805 -c dbshut_imm >>/usr/local/backup/back.log > #check for oracle=down > ps -ef |grep pmon >>/usr/local/backup/back.log > #do backup on tape > vdump -0 -f /dev/ntape/tape0c /pot1 >>/usr/local/backup/back.log > vdump -0 -f /dev/ntape/tape0c /pot2 >>/usr/local/backup/back.log > vdump -0 -f /dev/ntape/tape0c / >>/usr/local/backup/back.log > vdump -0 -f /dev/ntape/tape0c /var >>/usr/local/backup/back.log > vdump -0 -f /dev/ntape/tape0c /usr >>/usr/local/backup/back.log > #rewind tape > mt -f /dev/ntape/tape0c rewind >>/usr/local/backup/back.log > #start oracle and erp > su - ora805 -c dbstart >>/usr/local/backup/back.log > su - ora805 -c "lsnrctl start" >>/usr/local/backup/back.log > /sbin/init.d/p511_dem511 start >>/usr/local/backup/back.log > sleep 10 > /sbin/init.d/p511_pr511 start >>/usr/local/backup/back.log > sleep 10 > /sbin/init.d/bde511_pz511p start >>/usr/local/backup/back.log > sleep 20 > /sbin/init.d/bdepz_start >>/usr/local/backup/back.log > #check if backup was ok > vrestore -tvf /dev/ntape/tape0c >>/usr/local/backup/back.log > vrestore -tvf /dev/ntape/tape0c >>/usr/local/backup/back.log > vrestore -tvf /dev/ntape/tape0c >>/usr/local/backup/back.log > vrestore -tvf /dev/ntape/tape0c >>/usr/local/backup/back.log > vrestore -tvf /dev/ntape/tape0c >>/usr/local/backup/back.log > mt -f /dev/ntape/tape0c rewind >>/usr/local/backup/back.log > mail root