cat rman_back.sh
#!/bin/bash
source /home/oracle/.bash_profile
 
rman log=/u01/backup/backupall_rman.log <<EOF
connect target /
 
run
{
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 30 DAYS;
allocate channel dev1 device type disk maxpiecesize 5G;
backup as compressed backupset database format  '/u01/backup/full_db_%T_%d_%s_%p_%u';
release channel dev1;
}
 
run
{
backup as compressed backupset archivelog all delete all input format '/u01/backup/archivelog_%T_%s_%p_%u';
backup spfile format '/u01/backup/spfile_%T_%s_%p_%u';
backup current controlfile format  '/u01/backup/controlfile_%T_%s_%p_%u';
 
}
 
crosscheck archivelog all;
delete noprompt expired archivelog all;
crosscheck backup;
delete noprompt expired backup;
report obsolete;
delete noprompt obsolete;
exit;
EOF

rman全备脚本的更多相关文章

  1. Linux 平台下 RMAN 全备 和 增量备份 shell 脚本

    转:http://blog.csdn.net/tianlesoftware/article/details/5740630 全备脚本 以 nocatalog 模式为例: Shell 脚本: ##### ...

  2. oracle 操作实例(一)----rman 全备恢复

    一,环境背景 拥有全备数据库 全备脚本: export TMP=/tmp export TMPDIR=$TMP export ORACLE_BASE=/u01 export ORACLE_SID=pr ...

  3. catalog备份数据库及RMAN存储脚本

    环境说明: 提前配置好两个库的监听与tnsnames.oraIP:10.100.25.13 为目标数据库  IP:10.100.25.14 为恢复目录数据库(catalog database) 以下操 ...

  4. 基于catalog 创建RMAN存储脚本

    --============================== -- 基于catalog 创建RMAN存储脚本 --============================== 简言之,将rman的 ...

  5. 创建和使用RMAN存储脚本

    创建和使用RMAN存储脚本:1.连接恢复目录(可以不连接到目标库):C:\Users\Administrator>rman target sys/rusky@rusky catalog=rcat ...

  6. RMAN备份脚本执行遇到RMAN-03002,06091问题处理

    一 问题描述 客户说RMAN备份脚本执行有的时候报错,有的时候正常!!! 远程登陆客户环境,查询最后一次备份的日志报错信息,得到 RMAN-03002: failure of delete comma ...

  7. RMAN备份脚本一列分享

    在ORACLE数据库中,RMAN备份的脚本非常多,下面介绍一例shell脚本如何通过RMAN备份,以及FTP上传RMAN备份文件以及归档日志文件的脚本. fullback.sh 里面调用RMAN命令做 ...

  8. RMAN恢复脚本案例

    $ crontab -l0 12,19 * * * $ORACLE_HOME/scripts/arcbkup.sh59 03 * * *  $ORACLE_HOME/scripts/dbbkup.sh ...

  9. RMAN备份脚本

      单机环境全备   export ORACLE_BASE=/oracle export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1 export ORA ...

随机推荐

  1. leetcode29 两数相除 int 与移位

    难受啊 考虑越界 考虑dividend为-2^31,用负数移位运算 class Solution { public: int divide(int dividend, int divisor) { i ...

  2. React Hooks: useEffect All In One

    React Hooks: useEffect All In One useEffect https://reactjs.org/docs/hooks-effect.html https://react ...

  3. how to publish a UMD module

    how to publish a UMD module 如何发布UMD模块 npm https://github.com/xgqfrms/umd-npm-package https://www.npm ...

  4. website text select notes menu

    website text select notes menu website 文字选择笔记菜单(下划线, 标记, 复制, 分享) 下划线, 标记 https://time.geekbang.org/ ...

  5. React Native Apps

    React Native Apps https://github.com/ReactNativeNews/React-Native-Apps github app https://github.com ...

  6. SVG & Sprite & symbol & use

    SVG & Sprite & symbol & use https://www.zhangxinxu.com/sp/svgo/ https://www.zhangxinxu.c ...

  7. Node.js & ES modules & .mjs

    Node.js & ES modules & .mjs Node.js v13.9.0 https://nodejs.org/api/esm.html https://nodejs.o ...

  8. HTTP/3 protocol

    HTTP/3 protocol https://caniuse.com/#feat=http3 HTTP/3 H3 https://en.wikipedia.org/wiki/HTTP/3 QUIC ...

  9. Dart: 解析html字符串

    安装html包 import 'package:http/http.dart' as http; import 'package:html/parser.dart' show parse; impor ...

  10. AttributeError: 'function' object has no attribute 'as_view'

    我的描述:当我启用jwt_required来进行token验证的时候,我提示错误; 解决方案: 修改前代码: 修改后代码: 多看书.多多了解.多看看世界...