* backup skript runs manually but not with cron
@ 2003-01-08 11:36 cb
2003-01-08 12:06 ` Richard Gliebe
2003-01-08 14:15 ` News Account
0 siblings, 2 replies; 7+ messages in thread
From: cb @ 2003-01-08 11:36 UTC (permalink / raw)
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 </usr/local/backup/back.log
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: backup skript runs manually but not with cron
2003-01-08 11:36 backup skript runs manually but not with cron cb
@ 2003-01-08 12:06 ` Richard Gliebe
2003-01-09 14:58 ` cb
2003-01-08 14:15 ` News Account
1 sibling, 1 reply; 7+ messages in thread
From: Richard Gliebe @ 2003-01-08 12:06 UTC (permalink / raw)
Hi, can you show me the crontab from root
and insert in your script "set -x"
Richard
"cb" <notify@beckerulm.de> 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 </usr/local/backup/back.log
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: backup skript runs manually but not with cron
2003-01-08 12:06 ` Richard Gliebe
@ 2003-01-09 14:58 ` cb
2003-01-10 5:46 ` Richard Gliebe
0 siblings, 1 reply; 7+ messages in thread
From: cb @ 2003-01-09 14:58 UTC (permalink / raw)
Thanx for the time spending on my "fool" problem.
I'll put "set -x" in the first line of the backup script and check it
out tonight (good idea by the way).
Here is the root crontab you requested:
The entry is the one at the last line (some other entries might have
two lines because the width of this e-mail sheet is not enough).
#
# *****************************************************************
# * *
# * Copyright Compaq Computer Corporation, 2000 *
# * *
# * The software contained on this media is proprietary to *
# * and embodies the confidential technology of Compaq *
# * Computer Corporation. Possession, use, duplication or *
# * dissemination of the software and media is authorized only *
# * pursuant to a valid written license from Compaq Computer *
# * Corporation. *
# * *
# * RESTRICTED RIGHTS LEGEND Use, duplication, or disclosure *
# * by the U.S. Government is subject to restrictions as set *
# * forth in Subparagraph (c)(1)(ii) of DFARS 252.227-7013, *
# * or in FAR 52.227-19, as applicable. *
# * *
# *****************************************************************
#
# HISTORY
#
# @(#)$RCSfile: root,v $ $Revision: 4.3.58.1 $ (DEC) $Date: 2000/03/14
21:02:48 $
#
# (c) Copyright 1990, 1991, 1992, 1993 OPEN SOFTWARE FOUNDATION, INC.
# ALL RIGHTS RESERVED
#
# OSF/1 Release 1.2
#
# root crontab file
#
15 4 * * * find /var/preserve -mount -mtime +7 -type f -exec rm -f {}
\;
20 4 * * * find /tmp/ -mount -type f -atime +2 -exec rm -f {} \;
30 4 * * * find /var/tmp/ -mount -type f -atime +7 -exec rm -f {} \;
40 4 * * * find /var/adm/syslog.dated/* -depth -type d -ctime +7 -exec
rm -rf {} \;
#0 3 * * 4 /usr/sbin/acct/dodisk > /var/adm/diskdiag &
#1 1 * * * test -x /usr/sbin/defragcron && /usr/sbin/defragcron -p -l
/usr/adm/defragcron
#0 2 1 * * kill -USR1 `cat /var/run/binlogd.pid`
#
# To get the standard output by email remove the output redirection.
#
0 2 * * 0 /usr/lbin/logclean /var/adm/wtmp > /dev/null
#
# Run the script to perform maintenance on LSMSA log files
#
12 2 * * 0 test -x /usr/lib/java/applications/lsmsa/logMaintenance &&
/usr/lib/java/applications/lsmsa/logMaintenance 10 > /dev/null
#
# Run the script to execute sys_check for Insight Manager
#
#0 3 * * 0 /usr/share/sysman/bin/runsyscheck
50 23 * * * /usr/local/backup/backup2
again thanx in advance
chris
"Richard Gliebe" <rigl68@gmx.at> wrote in message news:<3e1c1455$1@eumel.hag.hilti.com>...
> Hi, can you show me the crontab from root
>
> and insert in your script "set -x"
>
> Richard
>
> "cb" <notify@beckerulm.de> 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 </usr/local/backup/back.log
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: backup skript runs manually but not with cron
2003-01-09 14:58 ` cb
@ 2003-01-10 5:46 ` Richard Gliebe
2003-01-10 18:18 ` cb
0 siblings, 1 reply; 7+ messages in thread
From: Richard Gliebe @ 2003-01-10 5:46 UTC (permalink / raw)
let's write the script output and errors to stdout like this:
50 23 * * * /usr/local/backup/backup2 1>/tmp/backup2.cron 2>&1
Richard
(from Liechtenstein)
"cb" <notify@beckerulm.de> schrieb im Newsbeitrag
news:55ab2828.0301090658.264781ee@posting.google.com...
> Thanx for the time spending on my "fool" problem.
> I'll put "set -x" in the first line of the backup script and check it
> out tonight (good idea by the way).
>
> Here is the root crontab you requested:
> The entry is the one at the last line (some other entries might have
> two lines because the width of this e-mail sheet is not enough).
> #
> # *****************************************************************
> # * *
> # * Copyright Compaq Computer Corporation, 2000 *
> # * *
> # * The software contained on this media is proprietary to *
> # * and embodies the confidential technology of Compaq *
> # * Computer Corporation. Possession, use, duplication or *
> # * dissemination of the software and media is authorized only *
> # * pursuant to a valid written license from Compaq Computer *
> # * Corporation. *
> # * *
> # * RESTRICTED RIGHTS LEGEND Use, duplication, or disclosure *
> # * by the U.S. Government is subject to restrictions as set *
> # * forth in Subparagraph (c)(1)(ii) of DFARS 252.227-7013, *
> # * or in FAR 52.227-19, as applicable. *
> # * *
> # *****************************************************************
> #
> # HISTORY
> #
> # @(#)$RCSfile: root,v $ $Revision: 4.3.58.1 $ (DEC) $Date: 2000/03/14
> 21:02:48 $
> #
> # (c) Copyright 1990, 1991, 1992, 1993 OPEN SOFTWARE FOUNDATION, INC.
> # ALL RIGHTS RESERVED
> #
> # OSF/1 Release 1.2
> #
> # root crontab file
> #
> 15 4 * * * find /var/preserve -mount -mtime +7 -type f -exec rm -f {}
> \;
> 20 4 * * * find /tmp/ -mount -type f -atime +2 -exec rm -f {} \;
> 30 4 * * * find /var/tmp/ -mount -type f -atime +7 -exec rm -f {} \;
> 40 4 * * * find /var/adm/syslog.dated/* -depth -type d -ctime +7 -exec
> rm -rf {} \;
> #0 3 * * 4 /usr/sbin/acct/dodisk > /var/adm/diskdiag &
> #1 1 * * * test -x /usr/sbin/defragcron && /usr/sbin/defragcron -p -l
> /usr/adm/defragcron
> #0 2 1 * * kill -USR1 `cat /var/run/binlogd.pid`
> #
> # To get the standard output by email remove the output redirection.
> #
> 0 2 * * 0 /usr/lbin/logclean /var/adm/wtmp > /dev/null
> #
> # Run the script to perform maintenance on LSMSA log files
> #
> 12 2 * * 0 test -x /usr/lib/java/applications/lsmsa/logMaintenance &&
> /usr/lib/java/applications/lsmsa/logMaintenance 10 > /dev/null
> #
> # Run the script to execute sys_check for Insight Manager
> #
> #0 3 * * 0 /usr/share/sysman/bin/runsyscheck
> 50 23 * * * /usr/local/backup/backup2
>
> again thanx in advance
>
> chris
>
> "Richard Gliebe" <rigl68@gmx.at> wrote in message
news:<3e1c1455$1@eumel.hag.hilti.com>...
> > Hi, can you show me the crontab from root
> >
> > and insert in your script "set -x"
> >
> > Richard
> >
> > "cb" <notify@beckerulm.de> 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 </usr/local/backup/back.log
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: backup skript runs manually but not with cron
2003-01-10 5:46 ` Richard Gliebe
@ 2003-01-10 18:18 ` cb
0 siblings, 0 replies; 7+ messages in thread
From: cb @ 2003-01-10 18:18 UTC (permalink / raw)
Like you wrote I analyzed it... and:
That's it....
The damned path of the vdump and the vrestore was needed.
Stupid mistake actually...
Thanks for the help and greetings
chris
"Richard Gliebe" <rigl68@gmx.at> wrote in message news:<3e1e5e19$1@eumel.hag.hilti.com>...
> let's write the script output and errors to stdout like this:
>
> 50 23 * * * /usr/local/backup/backup2 1>/tmp/backup2.cron 2>&1
>
> Richard
> (from Liechtenstein)
>
> "cb" <notify@beckerulm.de> schrieb im Newsbeitrag
> news:55ab2828.0301090658.264781ee@posting.google.com...
> > Thanx for the time spending on my "fool" problem.
> > I'll put "set -x" in the first line of the backup script and check it
> > out tonight (good idea by the way).
> >
> > Here is the root crontab you requested:
> > The entry is the one at the last line (some other entries might have
> > two lines because the width of this e-mail sheet is not enough).
> > #
> > # *****************************************************************
> > # * *
> > # * Copyright Compaq Computer Corporation, 2000 *
> > # * *
> > # * The software contained on this media is proprietary to *
> > # * and embodies the confidential technology of Compaq *
> > # * Computer Corporation. Possession, use, duplication or *
> > # * dissemination of the software and media is authorized only *
> > # * pursuant to a valid written license from Compaq Computer *
> > # * Corporation. *
> > # * *
> > # * RESTRICTED RIGHTS LEGEND Use, duplication, or disclosure *
> > # * by the U.S. Government is subject to restrictions as set *
> > # * forth in Subparagraph (c)(1)(ii) of DFARS 252.227-7013, *
> > # * or in FAR 52.227-19, as applicable. *
> > # * *
> > # *****************************************************************
> > #
> > # HISTORY
> > #
> > # @(#)$RCSfile: root,v $ $Revision: 4.3.58.1 $ (DEC) $Date: 2000/03/14
> > 21:02:48 $
> > #
> > # (c) Copyright 1990, 1991, 1992, 1993 OPEN SOFTWARE FOUNDATION, INC.
> > # ALL RIGHTS RESERVED
> > #
> > # OSF/1 Release 1.2
> > #
> > # root crontab file
> > #
> > 15 4 * * * find /var/preserve -mount -mtime +7 -type f -exec rm -f {}
> > \;
> > 20 4 * * * find /tmp/ -mount -type f -atime +2 -exec rm -f {} \;
> > 30 4 * * * find /var/tmp/ -mount -type f -atime +7 -exec rm -f {} \;
> > 40 4 * * * find /var/adm/syslog.dated/* -depth -type d -ctime +7 -exec
> > rm -rf {} \;
> > #0 3 * * 4 /usr/sbin/acct/dodisk > /var/adm/diskdiag &
> > #1 1 * * * test -x /usr/sbin/defragcron && /usr/sbin/defragcron -p -l
> > /usr/adm/defragcron
> > #0 2 1 * * kill -USR1 `cat /var/run/binlogd.pid`
> > #
> > # To get the standard output by email remove the output redirection.
> > #
> > 0 2 * * 0 /usr/lbin/logclean /var/adm/wtmp > /dev/null
> > #
> > # Run the script to perform maintenance on LSMSA log files
> > #
> > 12 2 * * 0 test -x /usr/lib/java/applications/lsmsa/logMaintenance &&
> > /usr/lib/java/applications/lsmsa/logMaintenance 10 > /dev/null
> > #
> > # Run the script to execute sys_check for Insight Manager
> > #
> > #0 3 * * 0 /usr/share/sysman/bin/runsyscheck
> > 50 23 * * * /usr/local/backup/backup2
> >
> > again thanx in advance
> >
> > chris
> >
> > "Richard Gliebe" <rigl68@gmx.at> wrote in message
> news:<3e1c1455$1@eumel.hag.hilti.com>...
> > > Hi, can you show me the crontab from root
> > >
> > > and insert in your script "set -x"
> > >
> > > Richard
> > >
> > > "cb" <notify@beckerulm.de> 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 </usr/local/backup/back.log
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: backup skript runs manually but not with cron
2003-01-08 11:36 backup skript runs manually but not with cron cb
2003-01-08 12:06 ` Richard Gliebe
@ 2003-01-08 14:15 ` News Account
2003-01-10 18:16 ` cb
1 sibling, 1 reply; 7+ messages in thread
From: News Account @ 2003-01-08 14:15 UTC (permalink / raw)
To test, take any redirection off of the cron entry so it will mail you the
output including errors.
You'll probably find you need full paths on your executables or need to put
a PATH statement at the top of the script.
Don Woodward
"cb" <notify@beckerulm.de> wrote in message
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 </usr/local/backup/back.log
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: backup skript runs manually but not with cron
2003-01-08 14:15 ` News Account
@ 2003-01-10 18:16 ` cb
0 siblings, 0 replies; 7+ messages in thread
From: cb @ 2003-01-10 18:16 UTC (permalink / raw)
That's it....
The damned path of the vdump and the vrestore was needed.
Stupid mistake actually...
Thanks for the help and greetings
chris
"News Account" <none@none.org> wrote in message news:<roWS9.4917$T5.2182580@news.alltel.net>...
> To test, take any redirection off of the cron entry so it will mail you the
> output including errors.
>
> You'll probably find you need full paths on your executables or need to put
> a PATH statement at the top of the script.
>
> Don Woodward
>
>
> "cb" <notify@beckerulm.de> wrote in message
> 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 </usr/local/backup/back.log
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2003-01-10 18:18 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-08 11:36 backup skript runs manually but not with cron cb
2003-01-08 12:06 ` Richard Gliebe
2003-01-09 14:58 ` cb
2003-01-10 5:46 ` Richard Gliebe
2003-01-10 18:18 ` cb
2003-01-08 14:15 ` News Account
2003-01-10 18:16 ` cb
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox