TSM和Oracle rman备份的shell脚本 增量 全备 归档日志

归档日志

    run {
    allocate channel c1 type 'sbt_tape' parms
    'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
    allocate channel c2 type 'sbt_tape' parms
    'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
    crosscheck archivelog all;
    backup archivelog all format 'arch_%U_%s.bak';
    release channel c1;
    release channel c2;
    }
    exit
    exit

增量备份

    su - oracle -c "date >> /oracle/rmanlog/bak0.log"
    su - oracle -c "rman target sys/oracle cmdfile /oracle/rmanlog/oraaddbackup.scr >> /oracle/rmanlog/bak0.log"
    run {
    allocate channel c1 type 'sbt_tape' parms
    'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
    allocate channel c2 type 'sbt_tape' parms
    'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
    backup
    incremental level 1
    filesperset 5
    format 'db_%t_%s_%p'
    (database);
    }

全备份

    su - oracle -c "date >> /oracle/rmanlog/bak0.log"
    su - oracle -c "rman target sys/oracle cmdfile /oracle/rmanlog/orafullbackup.scr >> /oracle/rmanlog/bak0.log"


    run {
    allocate channel c1 type 'sbt_tape' parms
    'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
    allocate channel c2 type 'sbt_tape' parms
    'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
    backup
    incremental level 0
    filesperset 5
    format 'db_%t_%s_%p'
    (database);
    }
参与6

5 同行回答

uc804 uc804 数据库运维工程师 企业
学习学习显示全部
学习学习 收起
互联网服务 · 2013-07-04
浏览1424
ss33205687 ss33205687 数据库管理员 西安
非常有用显示全部
非常有用 收起
互联网服务 · 2013-07-02
浏览1170

提问者

hotmail
hotmail 3 6 12
软件开发工程师 hotmail
擅长领域: 数据库服务器Linux
评论1762

相关问题

相关资料

相关文章

问题状态

  • 发布时间:2011-11-03
  • 关注会员:1 人
  • 问题浏览:9578
  • 最近回答:2014-03-30
  • X社区推广