databaseoracle-databaserman

Oracle DB RMAN backup


Iam having a weekly full backup in my database what i need is a script that first verify the new backup if it is valid then delete the old one iam doing this for saving space on my filesystem the Oracle database version = 12c


Solution

  • Append this checking at initial RMAN script

    rman> crosscheck backup;
    rman> crosscheck copy;
    rman> delete noprompt expired backupset;
    # Compress backup to reduce space (lab/test is ok, prod have to pay for license)
    CONFIGURE COMPRESSION ALGORITHM 'HIGH' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD FALSE;
    ...
    # database backup takes place here!
    ...
    

    Append this deletion at the end of current RMAN Script

    rman> configure retention policy to redundancy 1;
    rman> crosscheck backup;
    rman> crosscheck copy;
    rman> delete noprompt obsolete;