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命令删除的备份集信息

  • 相关阅读:
    关于高精度的那些事 ~
    LOJ #10002. 喷水装置
    [HAOI2008]糖果传递
    题解 CF1404B 【Tree Tag】
    题解 CF1407E 【Egor in the Republic of Dagestan】
    唯美歌词
    CF做题总结
    CSP2020游记
    数论
    hash好题
  • 原文地址:https://www.cnblogs.com/monkey6/p/11765779.html
Copyright © 2011-2022 走看看