Home > Blockchain >  Oracle DB RMAN backup
Oracle DB RMAN backup

Time:05-31

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

CodePudding user response:

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;
  • Related