Chinaunix首页 | 论坛 | 博客
  • 博客访问: 107077
  • 博文数量: 38
  • 博客积分: 506
  • 博客等级: 下士
  • 技术积分: 405
  • 用 户 组: 普通用户
  • 注册时间: 2011-03-03 10:46
文章分类
文章存档

2014年(6)

2013年(10)

2012年(22)

我的朋友

分类: Oracle

2013-11-01 13:51:06

20 23 * * 6 sh /home/oracle/dba/rman_full

RMAN_full

export ORACLE_SID=orcl
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export PATH=$ORACLE_HOME/bin:$ORA_CRS_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin
PATH=$PATH:$HOME/bin
rman target / log=/u01/rmanlog/`date +%Y%m%d-%H:%M:%S`.log  cmdfile=/u01/run/rman_full.sql

rman_full.sql

CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;
CONFIGURE DEVICE TYPE DISK PARALLELISM 4 BACKUP TYPE TO BACKUPSET;
CONFIGURE CHANNEL DEVICE TYPE DISK MAXPIECESIZE 4096 M FORMAT '/data2/backup/%U';
CONFIGURE CONTROLFILE AUTOBACKUP OFF;

run{
crosscheck backupset;

#delete noprompt obsolete recovery window of 8 days;

backup as compressed backupset database format = "/data2/backup/%n_data_%T_%U.bak" ;

backup as compressed backupset current controlfile plus archivelog not backed up 1 times  format = "/data2/backup/%n_log_%T_%U.bak" ;

backup spfile format ='/data2/backup/%n_spfile_%T_%U.bak';
backup as compressed backupset current controlfile format='/data2/backup/%n_control_%T_%U.bak';
}
~     


arch_full.sql

CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET;
CONFIGURE CHANNEL DEVICE TYPE DISK MAXPIECESIZE 4096 M;

run{
crosscheck backupset;

delete noprompt obsolete recovery window of 8 days;

backup as compressed backupset current controlfile plus archivelog not backed up 1 times  format = "/data2/backup/%n_log_%T_%U.bak" ;

DELETE NOPROMPT ARCHIVELOG all completed before 'sysdate-4';

}

阅读(1073) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~