unix script for rman [message #117617] |
Thu, 28 April 2005 09:32 |
alanm
Messages: 284 Registered: March 2005
|
Senior Member |
|
|
hi all
can anyone provide a unix script which runs from cron to call rman to perform a backup
the rman script is
run {
allocate channel c1 type 'SBT_TAPE parms
'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin/tdpo.opt)';
backup
incremental level 0
format '/tmp/prd_%s.bak'
(database include current controlfile ) ;
}
this command works fine stand alone but I need to automate it via cron.
rman is accessed via
rman target system/tommy rcvcat rman/rman@rman
cheers
Alan
[Updated on: Thu, 28 April 2005 09:33] Report message to a moderator
|
|
|
Re: unix script for rman [message #118484 is a reply to message #117617] |
Thu, 05 May 2005 09:48 |
Frank Naude
Messages: 4580 Registered: April 1998
|
Senior Member |
|
|
Something like this should do:
#!/bin/ksh
ORACLE_SID=orcl
ORACLE_HOME=/app/oracle/product/10.1.0
PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_SID ORACLE_HOME PATH
rman target system/tommy rcvcat rman/rman\@rman <<EOF
run {
allocate channel c1 type 'SBT_TAPE parms
'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin/tdpo.opt)';
backup
incremental level 0
format '/tmp/prd_%s.bak'
(database include current controlfile);
}
EOF
Best regards.
Frank
|
|
|
|