RMAN delete expired backup and not expired backup

delete backup–DELETE command

delete is used for deleting record and corresponding physical file of RMAN backup.

It will generate RMAN backup record in RMAN repository when you execute backup operation.

The backup record will stored in control file by default. But if you configured Recovery Catalog,

the backup record will also be stored in Recovery Catalog.

Delete command is used to delete record and the related physical backup pieces.

 

delete expired backup

RMAN will confirm whether the backup is expired or not based on Redundancy strategy.

But for OBSOLETE backup set, you’d better do operation as the following steps:

crosscheck backupset;(or execute crosscheck backup;)

report obsolete;

delete obsolete;

firstly, execute CROSSCHECK command, the purpose is to confirm backup set.

If CROSSCHECK find backup invalid(such as the damage and lost of corrsponding data file),

RMAN wil mark expired status for this backup set.

You can execure “DELTE EXPIRED BACKUP” if you need to delete corresponding backup record.

command

RMAN> DELETE EXPIRED BACKUP;

delete EXPIRED copy:

RMAN> DELETE EXPIRED COPY;

delete specific backup set:

RMAN> DELETE BACKUPSET 19;

delete specific backup pieces:

RMAN> DELETE BACKUPPIECE ‘d:/backup/DEMO_19.bak’;

delete all backup sets:

RMAN> DELETE BACKUP;

delete specific image copy

RMAN> DELETE DATAFILE COPY ‘d:/backup/DEMO_19.bak’;

delte all image copy:

RMAN> DELETE COPY;

delete object of input after finished backup:

RMAN> BACKUP ARCHIVELOG ALL DELETE INPUT;

RMAN> DELETE BACKUPSET 22 FORMAT = “d:/backup/%u.bak” DELETE INPUT;

 

Source URL:https://blog.csdn.net/u014102846/article/details/56840416

Leave a Reply