注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

欢迎光临我的博客

 
 
 

日志

 
 

rman备份脚本  

2008-05-23 10:31:06|  分类: 数据库 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

1  aix+rac+raw+ora10g   方式

# cat hot_back.sh
su - oracle<<EOU
rman target / msglog /back/rman.log append <<EOF
CONFIGURE RETENTION POLICY TO REDUNDANCY 10;
run
{
        ALLOCATE CHANNEL CH1 DEVICE TYPE DISK  MAXPIECESIZE=4000M;
        backup incremental level 0 cumulative database
        format '/back/DB_%d_%U_%T.BKP';
        RELEASE CHANNEL CH1;
}
run
{
        ALLOCATE CHANNEL CH1 DEVICE TYPE DISK;
        sql 'ALTER SYSTEM ARCHIVE LOG CURRENT';
        sql 'ALTER SYSTEM CHECKPOINT';
        backup archivelog all delete input
        format '/back/ARC_%d_%U_%T.BKP';
        RELEASE CHANNEL CH1;
}
run
{
        ALLOCATE CHANNEL CH1 DEVICE TYPE DISK ;
        backup current controlfile format '/back/CTL_%d_%U_%T.BKP';
        RELEASE CHANNEL CH1;
}
delete force noprompt obsolete;
EOF

# cat .profile


PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:$HOME/bin:/usr/bin/X11:/sbin:.

export PATH

if [ -s "$MAIL" ]           # This is at Shell startup.  In normal
then echo "$MAILMSG"        # operation, the Shell checks
fi                          # periodically.
export PATH
unset USERNAME
PS1='$PWD'@"`hostname`>"
export ORACLE_BASE=/home/oracle
export ORACLE_CRS_HOME=/home/crs
export ORACLE_HOME=$ORACLE_BASE/product/10.2.1/db_1
export DISPLAY=10.0.2.129:0.0
export TNS_ADMIN=$ORACLE_HOME/network/admin
export ORACLE_OWNER=oracle
export PATH=$ORACLE_CRS/bin:$ORACLE_HOME/bin:/etc:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/lib32:/lib:/usr/lib:/usr/td
/lib:/usr/ucblib:/usr/local/lib:/usr/openwin/lib

export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib:$ORA
CLE_HOME/network/jlib

#PATH
PATH=/usr/bin:/etc:/usr/sbin:/usr/ccs/bin
PATH=$PATH:/usr/ucb:$HOME/bin:/usr/bin/X11:/sbin
PATH=$PATH:/bin:/opt/bin:/opt/local/bin:$ORACLE_HOME/bin
PATH=$PATH:/usr/lbin:/usr/local/bin:/usr/ucb:/usr/openwin/bin
PATH=$PATH:/opt/local/GNU/bin:/opt/NSCPnav/bin:/usr/local/samba/bin:/usr/ucb:.
export PATH

export DBCA_RAW_CONFIG=/home/oracle/.dbca_raw_config
export TEMP=/tmp
export TEMPDIR=/tmp

export ORACLE_SID=rac1

 

# cat .dbca_raw_config
sysaux=/dev/o9_sysaux
system=/dev/o9_system
undotbs1=/dev/o9_undotbs1
undotbs2=/dev/o9_undotbs2
redo1_1=/dev/o9_log11
redo1_2=/dev/o9_log12
redo2_1=/dev/o9_log21
redo2_2=/dev/o9_log22
users=/dev/o9_users
tools=/dev/o9_tools
temp=/dev/o9_temp
indx=/dev/o9_indx
example=/dev/o9_example
control1=/dev/o9_cntrl1
control2=/dev/o9_cntrl2
control3=/dev/o9_cntrl3
spfile=/dev/o9_spfile
pwfile=/dev/o9_pwfile


# cat inittab
: @(#)49  1.28.2.11  src/bos/etc/inittab/inittab, cmdoper, bos530 2/19/04 11:22:
58
: IBM_PROLOG_BEGIN_TAG
: This is an automatically generated prolog.
:
: bos530 src/bos/etc/inittab/inittab 1.28.2.11
:
: Licensed Materials - Property of IBM
:
: (C) COPYRIGHT International Business Machines Corp. 1989,1993
: All Rights Reserved
:
: US Government Users Restricted Rights - Use, duplication or
: disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
:
: IBM_PROLOG_END_TAG
:
:  COMPONENT_NAME: CMDOPER
:
:  ORIGINS: 3, 27
:
:  (C) COPYRIGHT International Business Machines Corp. 1989, 1993
:  All Rights Reserved
:  Licensed Materials - Property of IBM
:
:  US Government Users Restricted Rights - Use, duplication or
:  disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
:
: Note - initdefault and sysinit should be the first and second entry.
:
init:2:initdefault:
brc::sysinit:/sbin/rc.boot 3 >/dev/console 2>&1 # Phase 3 of system boot
powerfail::powerfail:/etc/rc.powerfail 2>&1 | alog -tboot > /dev/console # Power
 Failure Detection
mkatmpvc:2:once:/usr/sbin/mkatmpvc >/dev/console 2>&1
atmsvcd:2:once:/usr/sbin/atmsvcd >/dev/console 2>&1
load64bit:2:wait:/etc/methods/cfg64 >/dev/console 2>&1 # Enable 64-bit execs
tunables:23456789:wait:/usr/sbin/tunrestore -R > /dev/console 2>&1 # Set tunable
s
rc:23456789:wait:/etc/rc 2>&1 | alog -tboot > /dev/console # Multi-User checks
fbcheck:23456789:wait:/usr/sbin/fbcheck 2>&1 | alog -tboot > /dev/console # run
/etc/firstboot
srcmstr:23456789:respawn:/usr/sbin/srcmstr # System Resource Controller
rctcpip:2:wait:/etc/rc.tcpip > /dev/console 2>&1 # Start TCP/IP daemons
mkcifs_fs:2:wait:/etc/mkcifs_fs > /dev/console 2>&1
sniinst:2:wait:/var/adm/sni/sniprei > /dev/console 2>&1
rcnfs:2:wait:/etc/rc.nfs > /dev/console 2>&1 # Start NFS Daemons
cron:23456789:respawn:/usr/sbin/cron
piobe:2:wait:/usr/lib/lpd/pioinit_cp >/dev/null 2>&1  # pb cleanup
qdaemon:2:wait:/usr/bin/startsrc -sqdaemon
writesrv:2:wait:/usr/bin/startsrc -swritesrv
uprintfd:23456789:respawn:/usr/sbin/uprintfd
shdaemon:2:off:/usr/sbin/shdaemon >/dev/console 2>&1 # High availability daemon
l2:2:wait:/etc/rc.d/rc 2
l3:3:wait:/etc/rc.d/rc 3
l4:4:wait:/etc/rc.d/rc 4
l5:5:wait:/etc/rc.d/rc 5
l6:6:wait:/etc/rc.d/rc 6
l7:7:wait:/etc/rc.d/rc 7
l8:8:wait:/etc/rc.d/rc 8
l9:9:wait:/etc/rc.d/rc 9
naudio::boot:/usr/sbin/naudio > /dev/null
ntbl_reset:2:once:/usr/bin/ntbl_reset_datafiles
rcml:2:once:/usr/sni/aix53/rc.ml > /dev/console 2>&1
logsymp:2:once:/usr/lib/ras/logsymptom # for system dumps
perfstat:2:once:/usr/lib/perf/libperfstat_updt_dictionary >/dev/console 2>&1
diagd:2:once:/usr/lpp/diagnostics/bin/diagd >/dev/console 2>&1
xmdaily:2:once:/usr/bin/xmwlm -L 2>&1 >/dev/null # Start xmwlm daily recording
ctrmc:2:once:/usr/bin/startsrc -s ctrmc > /dev/console 2>&1
dt:2:wait:/etc/rc.dt
cons:0123456789:respawn:/usr/sbin/getty /dev/console
ha_star:h2:once:/etc/rc.ha_star >/dev/console 2>&1
vty0:2:off:/usr/sbin/getty /dev/vty0
vty1:2:off:/usr/sbin/getty /dev/vty1
rcnetwlm:23456789:wait:/etc/rc.netwlm start> /dev/console 2>&1 # Start netwlm
tty0:2:off:/usr/sbin/getty /dev/tty0
orapw:2:wait:/etc/loadext -L /etc
h1:2:respawn:/etc/init.evmd run >/dev/null 2>&1 </dev/null
h2:2:respawn:/etc/init.cssd fatal >/dev/null 2>&1 </dev/null
h3:2:respawn:/etc/init.crsd run >/dev/null 2>&1 </dev/null
h4:2:respawn:/usr/scripts/appstart.sh run >/dev/null 2>&1 </dev/null

  评论这张
 
阅读(739)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017