RMAN - Backup/Recovery Tool

    更多文章

    常用 RMAN 指令

    登入 RMAN console
    $ rman target /
    or
    $ rman target / nocatalog 
    
    RMAN 外部指令檔
    rman target / cmdfile=mybackup.rmn 
    rman target / nocatalog @/path/to/mybackup.rman log=/path/to/mybackup.log
    

    mybackup.rmn:

    configure device type disk parallelism 2;
    backup datafile 4 section size 1100m;
    
    檢查 DB 備份所需的 archive log 檔是否有缺
    RMAN> backup validate database archivelog all;
    
    清除無效的 archive log 檔

    NOTE: 備份DB時遭遇到錯誤 ORA-19625,或磁碟空間不足想手動清除 log 時

    // validate all archvelogs in your disk. If some are missing, it will treat it as expired.
    RMAN> crosscheck archivelog all;
    
    // it ill delete expired archivelog and updates your controlfile.
    RMAN> delete expired archivelog all;
    
    backup/restore 驗證測試
    backup validate ......
    RMAN> backup validate database archivelog all;
    
    restore validate ..... 
    
    列出DB及Archive Log 備份紀錄
    RMAN> list backup of archivelog all;
    列出參數設定
    RMAN> show all;
    
    RMAN configuration parameters are:
    CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
    CONFIGURE BACKUP OPTIMIZATION OFF; # default
    CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
    CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
    CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
    CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
    CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
    CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT   '/opt/oracle/oradata/orabak/win/rmandata/%U';
    CONFIGURE MAXSETSIZE TO UNLIMITED; # default
    CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
    CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
    CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
    CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/opt/oracle/product/10.2.0.5.4/db_1/dbs/snapcf_win.f'; # default
    
    標籤 (Edit tags)
    • No tags
    您必須 登入 才能發佈評論。
    Powered by MindTouch Core