automatic scheduling of RMAN backups [message #74410] |
Mon, 06 December 2004 22:20 |
satish
Messages: 112 Registered: September 2000
|
Senior Member |
|
|
Hi,
Can we schedule RMAN backups to occur automatically..every day. Can i write KSH script as similar to cold & hot backups
thanks
satish
|
|
|
|
Re: automatic scheduling of RMAN backups [message #74438 is a reply to message #74410] |
Thu, 09 December 2004 09:02 |
croK
Messages: 170 Registered: April 2002
|
Senior Member |
|
|
This is my cron file in solaris:
export HOME=/oracle/app/oracle/product/8.1.6
ORACLE_SID=SID1 ; export ORACLE_SID
ORACLE_HOME=/oracle/app/oracle/product/8.1.6; export ORACLE_HOME
ORACLE_OWNER=oracle
export HOME=$ORACLE_HOME
PATH=.:$PATH:$HOME/bin:/etc:/usr/sbin:/opt/SUNWspro/bin:/usr/ccs/bin
export PATH
export NLS_LANG=American_America.we8iso8859p1
export NLS_DATE_FORMAT='DD-MM-YYYY:HH24:MI:SS'
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
DATE=`date '+%d-%m-%y:%H:%M:%S'`
/exports/scripts/rman_sid1.sh /exports/scripts/bk_sid1_full.rcv /exports/scripts/bk_sid1_full${DATE}
Where rman_sid1.sh is like:
rman target user/pwd@alias_target rcvcat rman/rman@alias_catalog cmdfile=$1 log = $2
And bk_sid1_full.rcv is like:
run {
shutdown immediate;
startup mount pfile=/exports/RMAN_sid1/initsid1.ora;
allocate channel d1 type disk;
allocate channel d2 type disk;
allocate channel d3 type disk;
allocate channel d4 type disk;
backup
filesperset 5
format '/oradata6/bk_%d_%s_%p'
database;
release channel d1;
release channel d2;
release channel d3;
release channel d4;
resync catalog;
sql 'alter database open';
}
Hope this help.
I have developed a graphical tool for reporting backups done with RMAN and i'm looking for people to test this tool.
Let me know if you are interested and will let you know how to proceed.
Thank you.
|
|
|