代码改变世界

RMAN备份注意事项

2014-08-15 00:13  AlfredZhao  阅读(845)  评论(0编辑  收藏  举报

1.建议最好打开控制文件的自动备份。

2.如果没有打开控制文件的自动备份,一定注意备份的顺序,无论之前有无备份控制文件,备份全库以及归档之后,在最后一定要再次备份控制文件。

3.使用%U,或者%d%T%s%p 惟一标识备份集。

4.一定要有完整的备份日志留存。

run块示例:

--周日、周三全库备份

run{

allocate channel c1 device type disk;

backup database tag 'dbfull' format '/backup/dbfull_%d%T%s%p';

backup archivelog all tag 'arch' delete input format '/backup/arch_%d%T%s%p';

backup current controlfile tag 'ctrl' format '/backup/ctrl_%d%T%s%p';

release channel c1;

}

 --其余时间归档备份

run{

allocate channel c1 device type disk;

backup archivelog all tag 'arch' delete input format '/backup/arch_%d%T%s%p';

backup current controlfile tag 'ctrl' format '/backup/ctrl_%d%T%s%p';

release channel c1;

}

--删除obsolete的备份集


allocate channel for maintenance device type disk;

allocate channel for maintenance device type sbt_tape;

crosscheck archivelog all;

crosscheck backup;

delete noprompt obsolete;