RMAN - Backup/Recovery Tool

    版本為 01:42, 27 Dec 2024

    到這個版本。

    返回到 版本存檔.

    查閱目前版本

    更多文章

    第一次使用 RMAN

     

    常用 RMAN 指令

    登入 RMAN console
    $ rman target /
    or
    $ rman target / nocatalog 
    
    RMAN 外部指令檔

     

    檢查 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
    
    Powered by MindTouch Core