Home » RDBMS Server » Backup & Recovery » unix script for rman
unix script for rman [message #117617] Thu, 28 April 2005 09:32 Go to next message
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 Go to previous messageGo to next message
Frank Naude
Messages: 4579
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
Re: unix script for rman [message #118626 is a reply to message #117617] Fri, 06 May 2005 09:46 Go to previous message
alanm
Messages: 284
Registered: March 2005
Senior Member

Thanks for the help guys, it works well.

Cool
Previous Topic: control_file_record_keep_time
Next Topic: IMPORT Data dump
Goto Forum:
  


Current Time: Sat Apr 20 02:45:42 CDT 2024