Oracle生产环境RMAN备份脚本
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了Oracle生产环境RMAN备份脚本,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含3722字,纯文字阅读大概需要6分钟。
内容图文
![Oracle生产环境RMAN备份脚本](/upload/InfoBanner/zyjiaocheng/554/71a75b3e47d84e8bb3cbdb46cfe09169.jpg)
题记:这里分享一下我们Oracle的备份脚本,这些脚本均在生产库运行,正确无误! 环境:SUSE Linux 10sp2 + Oracle 11gR1 说明:小
题记:这里分享一下我们Oracle的备份脚本,这些脚本均在生产库运行,正确无误!
环境:SUSE Linux 10sp2 + Oracle 11gR1
说明:小型库一般都是每周做一次全备,大型库每周也做一次全备外,周三做1级增量备份,然后每天晚上都做一次2级增量备份,归档日志每天分不同时段定时备份!
--------------------------------------分割线 --------------------------------------
推荐阅读:
RMAN 配置归档日志删除策略
Oracle基础教程之通过RMAN复制数据库
RMAN备份策略制定参考内容
RMAN备份学习笔记
Oracle数据库备份加密 RMAN加密
--------------------------------------分割线 --------------------------------------
小型库全备:
run {
# Hot database level 0 whole backup
allocate channel t1 type disk;
backup
incremental level 0
skip inaccessible
format '/backup/osedb_osedb01/data/back_%s_%p_%T_%d'
#AS COMPRESSED backupset
database plus archivelog
format '/backup/osedb_osedb01/arch/arclogback_%s_%p_%t_%d'
delete input;
delete obsolete;
release CHANNEL t1 ;
}
大库全备:
oracle@subsdb1:~/bin/incre_bakup_cmd> cat backup_db_level0.cmd
run {
# Hot database level 0 whole backup
allocate channel t1 type disk maxpiecesize=50G;
allocate channel t2 type disk maxpiecesize=50G;
allocate channel t3 type disk maxpiecesize=50G;
backup as compressed backupset
incremental level 0 tag 'subsdb_level0'
skip inaccessible
format '/backup/subsdb_subsdb1/data/bak_%d_%T_%s_%p_db_level0'
#AS COMPRESSED backupset
database
plus archivelog
format '/backup/subsdb_subsdb1/arch/arclogback_%s_%p_%t_%d'
delete input;
backup current controlfile format '/backup/subsdb_subsdb1/data/bak_%d_%T_%s_ctl.ctl';
release channel t1;
release channel t2;
release channel t3;
delete noprompt obsolete;
}
1级增量备份:
oracle@subsdb1:~/bin/incre_bakup_cmd> cat backup_db_level1.cmd
run {
# Hot database level 1 whole backup
allocate channel t1 type disk maxpiecesize=50G;
allocate channel t2 type disk maxpiecesize=50G;
allocate channel t3 type disk maxpiecesize=50G;
backup as compressed backupset
incremental level 1 tag 'subsdb_level1'
skip inaccessible
format '/backup/subsdb_subsdb1/data/bak_%d_%T_%s_%p_db_level1'
#AS COMPRESSED backupset
database plus archivelog
format '/backup/subsdb_subsdb1/arch/arclogback_%s_%p_%t_%d'
delete input;
backup current controlfile format '/backup/subsdb_subsdb1/data/bak_%d_%T_%s_ctl.ctl';
release channel t1;
release channel t2;
release channel t3;
delete noprompt obsolete;
}
2级增量备份:
oracle@subsdb1:~/bin/incre_bakup_cmd> cat backup_db_level2.cmd
run {
# Hot database level 2 whole backup
allocate channel t1 type disk maxpiecesize=50G;
allocate channel t2 type disk maxpiecesize=50G;
allocate channel t3 type disk maxpiecesize=50G;
backup as compressed backupset
incremental level 2 tag 'subsdb_level2'
skip inaccessible
format '/backup/subsdb_subsdb1/data/bak_%d_%T_%s_%p_db_level2'
#AS COMPRESSED backupset
database
plus archivelog
format '/backup/subsdb_subsdb1/arch/arclogback_%s_%p_%t_%d'
delete input;
backup current controlfile format '/backup/subsdb_subsdb1/data/bak_%d_%T_%s_ctl.ctl';
release channel t1;
release channel t2;
release channel t3;
delete noprompt obsolete;
}
归档日志备份:
cat backup_arch.cmd
run {
allocate channel t1 type disk;
backup
skip inaccessible
format '/backup/osedb_osedb01/arch/arclogback_%s_%p_%t_%d'
#AS COMPRESSED backupset
(archivelog all delete input);
delete obsolete;
release CHANNEL t1 ;
}
本文永久更新链接地址:
内容总结
以上是互联网集市为您收集整理的Oracle生产环境RMAN备份脚本全部内容,希望文章能够帮你解决Oracle生产环境RMAN备份脚本所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。