sitemap

RSS地图

收藏本站

设为首页

Oracle研究中心

当前位置:Oracle研究中心 > 运维DBA >

学习笔记:Oracle RMAN备份策略

时间:2016-05-10 22:02   来源:Oracle研究中心   作者:网络   点击:

天萃荷净 Oracle RMAN备份脚本

export ORACLE_BASE=/home/db
export ORACLE_HOME=$ORACLE_BASE/oracle/product/10.2.0
export ORACLE_SID=orcl
export PATH=$ORACLE_HOME/bin:$PATH
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
$ORACLE_HOME/bin/rman target/ cmdfile=/home/db/oracle/rman/rman_script.rcv log=/home/db/oracle/rman/log/rman_scrip.log


run{
backup incremental level=0 format '/home/db/oracle/dbbackup/inc0_%s_%p_%T_%d' database plus archivelog delete input;
backup spfile format='/ora_arch/dbback/spfilebak_%s_%p_%T_%d';
restore spfile to pfile '/ora_arch/dbback/pfile.bak';
}
CROSSCHECK BACKUPSET;
DELETE NOPROMPT OBSOLETE;
 
------------------------

run{
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 30 DAYS;
allocate channel c1 type disk;
allocate channel c2 type disk;
allocate channel c3 type disk;
backup database format '/home/oracle/aa/databasefull_%s_%p_%d_%c_%T';
backup current controlfile format '/home/oracle/aa/controlfull_%s_%p_%d_%c_%T';
backup archivelog all format '/home/oracle/aa/archfull_%s_%p_%d_%c_%T';
delete noprompt obsolete;
release channel c1;
release channel c2;
release channel c3;
}

--------------------------------------ORACLE-DBA----------------------------------------

最权威、专业的Oracle案例资源汇总之学习笔记:Oracle RMAN备份策略

本文由大师惜分飞原创分享,网址:http://www.oracleplus.net/arch/164.html

Oracle研究中心

关键词:

Oracle RMAN备份策略