这期内容当中小编将会给大家带来有关RMAN常用脚本是怎样的,文章内容丰富且以专业的角度为大家分析和叙述,阅读完这篇文章希望大家可以有所收获。
在学习了rman后自我感觉比较好用的脚本,仅供参考。
打开控制文件备份
CONFIGURE CONTROLFILE AUTOBACKUP ON;
备份归档日志
run{
crosscheck archivelog all;
delete noprompt expired archivelog all;
backup archivelog all;
format '/backup/archlog/arch_%d_%T_%s';
}
备份全库
RUN
{
ALLOCATE CHANNEL c1 DEVICE TYPE DISK;
ALLOCATE CHANNEL c2 DEVICE TYPE DISK;
cross check backupset;
delete expired archivelog all;
BACKUP database format ‘/backup/backupset/rman_full_%d_%T_%s’;
release CHANNEL c1 ;
release channel c2;
}
0级备份
{
ALLOCATE CHANNEL c1 DEVICE TYPE DISK;
ALLOCATE CHANNEL c2 DEVICE TYPE DISK;
BACKUP incremental level 0 database format ‘/backup/backupset/rman_incre_0_%d_%T_%s’;
cross check backupset;
delete noprompt expired backupset;
delete noprompt obsolete;
release CHANNEL :c1 ;
release channel :c2;
}
1 级增量备份
run {
backup incremental level=1 cumulative tag 'bys001-1' database
format "/backup/full/bys001full_%d_%t_%s"
plus archivelog
format "/backup/full/bys001arch_%d_%t_%s"
delete all input;
}
上述就是小编为大家分享的RMAN常用脚本是怎样的了,如果刚好有类似的疑惑,不妨参照上述分析进行理解。如果想知道更多相关知识,欢迎关注亿速云行业资讯频道。
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。