zoukankan      html  css  js  c++  java
  • rman备份脚本

    归档备份

    source ~/.bash_profile
    export ORACLE_SID=XXXXXX
    rman target / catalog xxxx/xxxx@XXX.XXX.XXX.XXX:1521/rcat <<eof
    run{ allocate channel c1 device type disk format
    '/backup/arch_%d_%T_%s_%p.bak'; allocate channel c2 device type disk format '/backup/arch_%d_%T_%s_%p.bak'; sql 'alter system archive log current'; backup as compressed backupset archivelog all delete input; } exit; eof

    全备

    source ~/.bash_profile
    export ORACLE_SID=XXXXXX
    rman target / catalog xxxx/xxxx@xxx.xxx.xxx.xxx:1521/rcat <<eof
    run{ allocate channel c1 device type disk format
    '/backup/full_%d_%T_%s_%p.bak'; allocate channel c2 device type disk format '/backup/full_%d_%T_%s_%p.bak'; allocate channel c3 device type disk format '/backup/full_%d_%T_%s_%p.bak'; sql 'alter system archive log current'; backup as compressed backupset database plus archivelog; backup current controlfile; backup spfile; crosscheck backup; delete noprompt obsolete; delete noprompt expired backup; } exit; eof

    delete obsolete删除恢复数据库不需要的备份集,这个是根据保留策略的(configure retention policy to redundancy 1)

    delete expired删除使用os命令删除的备份集信息

  • 相关阅读:
    TLE: poj 1011 Sticks
    UVa 116 Unidirectional TSP
    csuoj 1215 稳定排序
    UVa 103 Stacking Boxes
    UVa 147 Dollars
    UVa 111 History Grading
    怎么在ASP.NET 2.0中使用Membership
    asp.net中如何删除cookie?
    ASP.NET中的HTTP模块和处理程序[收藏]
    NET开发中的一些小技巧
  • 原文地址:https://www.cnblogs.com/monkey6/p/11765779.html
Copyright © 2011-2022 走看看