1:备份策略
15,45 6-23 * * * /home/oracle/shell/starbossdb_backup_arch.sh >> /home/oracle/shell/archive_log.rman
30 3 17 * * /home/oracle/shell/analyze_starboss.sql >> /home/oracle/shell/analyze.log
00 22 * * 2,4,6 /home/oracle/shell/starbossdb_backup.sh >> /home/oracle/shell/log.rman
2:全备脚本:
crosscheck backup;
report obsolete;
delete noprompt obsolete;
delete obsolete redundancy = 1;
crosscheck backup;
report obsolete;
delete noprompt obsolete;
delete obsolete redundancy = 1;
run{
allocate channel ch1 type disk ;
allocate channel ch2 type disk ;
allocate channel ch3 type disk ;
allocate channel ch4 type disk ;
allocate channel ch5 type disk ;
allocate channel ch6 type disk ;
allocate channel ch7 type disk ;
allocate channel ch8 type disk ;
allocate channel ch9 type disk ;
backup filesperset 10 database tag bossdb format '/rmanbackupibm/rmanbackup/bossdb%d%U.dbf.%T';
release channel ch1;
release channel ch2;
release channel ch3;
release channel ch4;
release channel ch5;
release channel ch6;
release channel ch7;
release channel ch8;
release channel ch9;
}
quit
3:归档日志备份脚本
run{
Crosscheck archivelog all;
delete noprompt archivelog until time 'SYSDATE-8';
allocate channel d1 type disk;
allocate channel d2 type disk;
allocate channel d3 type disk;
allocate channel d4 type disk;
allocate channel d5 type disk;
sql 'alter system archive log current';
sql 'alter system archive log current';
backup filesperset 20 format '/rmanbackupibm/archbackup/archlog_t%t_s%s_p%p' archivelog all delete input;
backup current controlfile format '/rmanbackupibm/archbackup/controlfile%d%U.dbf.%T';
release channel d1;
release channel d2;
release channel d3;
release channel d4;
release channel d5;
}
quit
阅读(1503) | 评论(0) | 转发(0) |